ibm-information-center/dist/eclipse/plugins/i5OS.ic.apis_5.4.0.1/QTEADDVT.htm

605 lines
19 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
<title>Add View Text (QteAddViewText) API</title>
<!-- Begin Header Records ========================================== -->
<!-- All rights reserved. Licensed Materials Property of IBM -->
<!-- US Government Users Restricted Rights -->
<!-- Use, duplication or disclosure restricted by -->
<!-- GSA ADP Schedule Contract with IBM Corp. -->
<!-- DEBUG1 SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
<!-- at RCHVMW2 on 29 Jan 1999 at 16:05:09 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--File Edited November 2001 -->
<!--End Header Records -->
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body>
<a name="top_Of_Page"></a>
<!-- Java sync-link -->
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript">
</script>
<h2>Add View Text (QteAddViewText) API</h2>
<div class="box" style="width: 60%;">
<br>
&nbsp;&nbsp;Required Parameter Group:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">1</td>
<td align="left" valign="top" width="50%">View number</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Text descriptor buffer</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Number of entries</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Format name</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(8)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Supplied text buffer</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="left" valign="top">Length of text buffer</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">7</td>
<td align="left" valign="top">Error code</td>
<td align="left" valign="top">I/O</td>
<td align="left" valign="top">Char(*)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Service Program: QTECRTVS<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Add View Text (QteAddViewText) API is used to describe a piece of text of a previously added view. As a processor reads its input source, it creates at least one view. This API is issued to add the directions for re-creating the text of these views. For the debugger to show the text that makes up a view, the location of the pieces of text that make up the view must be specified.</p>
<p>When the view is reconstructed by the debugger, the pieces of text will be retrieved and concatenated into a single piece of text, following the directions given when this API is called. Thus, when it is mentioned that text is copied, it is referring to a later time, when the view is reconstructed.</p>
<p>All the text for a view must be added at once, with one call to this API. For this reason, the text must be built up in a buffer as the processor produces its output. At the end of view creation, all text is then supplied to this API.</p>
<p>If any text comes from files, the file descriptors must have been previously added to the view with the Add View File (QteAddViewFile)
API.</p>
<br>
<!-- Please NOTE: DO NOT DELETE THIS SECTION if this API has no authorities and locks. -->
<!-- Instead, use the commented out coding below to indicate NONE. -->
<h3>Authorities and Locks</h3>
<!-- Use this if there are no authorities and locks. -->
<p>None.</p>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>View number</strong></dt>
<dd>INPUT; BINARY(4)
<p>The number of the view to which a piece of text is being added. This number must be the same as the number previously returned by the Add View Description API.</p>
</dd>
<dt><strong>Text descriptor buffer</strong></dt>
<dd>INPUT;CHAR(*)
<p>The input variable containing the text descriptors. Text descriptors define the location of text used to build the view specified in the view name parameter.</p>
</dd>
<dt><strong>Number of entries</strong></dt>
<dd>INPUT;BINARY(4)
<p>The number of text descriptors that are provided in the text descriptor buffer parameter.</p>
<p>Many pieces of text may be described in a single text descriptor buffer. However, each entry must represent a single piece of contiguous text, and this parameter must be a count of the number of entries provided.</p>
<p>Each entry must contain all fields indicated, but, depending on the type of text being described by the entry, certain fields will not be used by the API.</p>
<p>If any text is supplied by the calling program, it is identified by a text descriptor, but the text itself is contained in the supplied text buffer.</p>
</dd>
<dt><strong>Format name</strong></dt>
<dd>INPUT; CHAR(8)
<p>The content and format of the information supplied by the calling program in the text descriptor buffer. The valid values for format name are:</p>
<table cellpadding="3">
<!-- cols="15 85" -->
<tr>
<td valign="top"><em>TXTA0100</em></td>
<td valign="top">Used when the text being added to this view can come from any of the following:
<ul>
<li>Blanks<br><br></li>
<li>Stored in a file<br><br></li>
<li>Copied from the previous view<br><br></li>
<li>Supplied by the calling program within the supplied text buffer parameter</li>
</ul>
<p>This is the case for a *TEXT view.</p></td>
</tr>
<tr>
<td valign="top"><em>TXTA0101</em></td>
<td valign="top">Used when the entire text for this view is supplied text. This is the case for a *LISTING view.</td>
</tr>
<tr>
<td valign="top"><em>TXTA0102</em></td>
<td valign="top">Used when statement information for a *STATEMENT view is to be supplied.</td>
</tr>
<tr>
<td valign="top"><em>TXTA0103</em></td>
<td valign="top">Used when the entire text for this view is supplied text. This is the case for a *LISTING view. Note that this format is identical to TXTA0101; however, when the TXTA0103 format is specified, the listing view that is created will be compressed. When it is reconstructed, it will be decompressed at that time.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Supplied text buffer</strong></dt>
<dd>INPUT; CHAR(*)
<p>The input variable that is to be passed to the API, containing the text that is supplied when a text descriptor in the text descriptor buffer parameter indicates that text is supplied. Text descriptors within the text descriptor buffer refer to text locations within this buffer by the offset from the beginning of the buffer. The piece of text is ended by a NULL (hex 00) character. To conserve storage, delete the trailing blanks in lines of supplied text, and end the text with a null character.</p>
<p><strong>Note:</strong> A line of supplied text must not be more than 255 characters in length, not counting the NULL character.</p>
</dd>
<dt><strong>Length of text buffer</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the supplied text buffer.</p>
</dd>
<dt><strong>Error code</strong></dt>
<dd>I/O; CHAR(*)
<p>The structure in which to return error information. For the format of the structure, see <a href="../apiref/error.htm#hdrerrcod">Error Code Parameter</a>.</p>
</dd>
</dl>
<br>
<h3><a name="Header_26">TXTA0100 Format</a></h3>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th align="center" valign="bottom">Dec</th>
<th align="center" valign="bottom">Hex</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="20%">CHAR(10)</td>
<td align="left" valign="top" width="60%">Text location</td>
</tr>
<tr>
<td align="center" valign="top">10</td>
<td align="center" valign="top">A</td>
<td align="left" valign="top">CHAR(2)</td>
<td align="left" valign="top">Reserved</td>
</tr>
<tr>
<td align="center" valign="top">12</td>
<td align="center" valign="top">C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">File index</td>
</tr>
<tr>
<td align="center" valign="top">16</td>
<td align="center" valign="top">10</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Starting offset</td>
</tr>
<tr>
<td align="center" valign="top">20</td>
<td align="center" valign="top">14</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of lines</td>
</tr>
<tr>
<td align="center" valign="top">24</td>
<td align="center" valign="top">18</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">From line</td>
</tr>
</table>
<br><br>
<h3><a name="Header_27">TXTA0101 Format</a></h3>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th align="center" valign="bottom">Dec</th>
<th align="center" valign="bottom">Hex</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">Starting offset</td>
</tr>
</table>
<br><br>
<h3><a name="Header_28">TXTA0102 Format</a></h3>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th align="center" valign="bottom">Dec</th>
<th align="center" valign="bottom">Hex</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">Procedure dictionary ID</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="center" valign="top">4</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Statement number</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="left" valign="top">CHAR(1)</td>
<td align="left" valign="top">Statement type</td>
</tr>
</table>
<br><br>
<h3><a name="Header_29">TXTA0103 Format</a></h3>
<table border width="80%">
<tr>
<th align="center" valign="bottom" colspan="2">Offset</th>
<th align="left" valign="bottom" rowspan="2">Type</th>
<th align="left" valign="bottom" rowspan="2">Field</th>
</tr>
<tr>
<th align="center" valign="bottom">Dec</th>
<th align="center" valign="bottom">Hex</th>
</tr>
<tr>
<td align="center" valign="top" width="10%">0</td>
<td align="center" valign="top" width="10%">0</td>
<td align="left" valign="top" width="20%">BINARY(4)</td>
<td align="left" valign="top" width="60%">Starting offset</td>
</tr>
</table>
<br><br>
<h3><a name="Header_30">Field Descriptions</a></h3>
<p><strong>File index.</strong> A file member added by the Add View File API. This field is required if the text location is set to *FILE; otherwise, it is ignored. The first file added for the specified view is file 0, the second is file 1, and so forth.</p>
<p>When the view has a previous view, file 0 should not be specified. File 0 is assumed to mean a line in the previous view because the first file specified in the file descriptor must be the root source file used to construct this view. This root source file is the same as the previous view. Instead, *PREVIOUS should be specified in the text location field. If file 0 is specified instead of the previous view and the previous view was created by another preprocessor that created a temporary file as its output, that file may not exist at run time. In that case, text for the view could not be retrieved. However, if *PREVIOUS is specified, the View Retrieval API can use the text descriptors of the output view created by the preprocessor to reconstruct the text.</p>
<blockquote>
<p><strong>Note:</strong> The source debugger support does not validate the existence of this file. It merely uses the name in the view information to refer to the location of debug data. When the text of the view is reconstructed, text will be retrieved from the file named in this parameter (and the member name parameter), and the file name will be validated at that time.</p>
</blockquote>
<p><strong>From line.</strong> The line number where text is located. If the text location is a file, this is the line number in that file. If the text location is a previous view, this is the line position within that view. This can be thought of as the start line position. This field is required if the text location is set to *FILE or *PREVIOUS.</p>
<p><strong>Number of lines.</strong> The number of lines of text being described. It is intended that views be created in order, where each piece of text comes directly after the previous text added. This field is required when text location is set to *FILE or *PREVIOUS.</p>
<p><strong>Procedure dictionary ID.</strong> The dictionary number of the procedure where the statement is located.</p>
<p><strong>Reserved.</strong> Reserved for future use.</p>
<p><strong>Starting offset.</strong> The location within the supplied text buffer of the start of the supplied text. This is an offset from the beginning of the buffer to the start of the text. This field is required if the text location is set to *SUPPLIED in the TXTA0100 format.</p>
<p><strong>Statement number.</strong> The HLL statement number of the statement.</p>
<p><strong>Statement type.</strong> The type of the statement being added. Possible values are:</p>
<table cellpadding="3">
<!-- cols="15 85" -->
<tr>
<td valign="top"><em>X'01'</em></td>
<td valign="top">INIT CODE</td>
</tr>
<tr>
<td valign="top"><em>X'02'</em></td>
<td valign="top">PROC ENTRY</td>
</tr>
<tr>
<td valign="top"><em>X'03'</em></td>
<td valign="top">PROC EXIT</td>
</tr>
<tr>
<td valign="top"><em>X'04'</em></td>
<td valign="top">ALLOC</td>
</tr>
<tr>
<td valign="top"><em>X'05'</em></td>
<td valign="top">STMT</td>
</tr>
<tr>
<td valign="top"><em>X'06'</em></td>
<td valign="top">ENTRY</td>
</tr>
<tr>
<td valign="top"><em>X'07'</em></td>
<td valign="top">EXIT</td>
</tr>
<tr>
<td valign="top"><em>X'08'</em></td>
<td valign="top">MULTIEXIT</td>
</tr>
<tr>
<td valign="top"><em>X'09'</em></td>
<td valign="top">PATH LABEL</td>
</tr>
<tr>
<td valign="top"><em>X'10'</em></td>
<td valign="top">PATH CALL BGN</td>
</tr>
<tr>
<td valign="top"><em>X'11'</em></td>
<td valign="top">PATH CALL RET</td>
</tr>
<tr>
<td valign="top"><em>X'12'</em></td>
<td valign="top">PATH DO BGN</td>
</tr>
<tr>
<td valign="top"><em>X'13'</em></td>
<td valign="top">PATH TRUEIF</td>
</tr>
<tr>
<td valign="top"><em>X'14'</em></td>
<td valign="top">PATH FALSEIF</td>
</tr>
<tr>
<td valign="top"><em>X'15'</em></td>
<td valign="top">PATH WHEN BGN</td>
</tr>
<tr>
<td valign="top"><em>X'16'</em></td>
<td valign="top">PATH OTHERW</td>
</tr>
<tr>
<td valign="top"><em>X'17'</em></td>
<td valign="top">GOTO</td>
</tr>
<tr>
<td valign="top"><em>X'18'</em></td>
<td valign="top">POST COMPOUND</td>
</tr>
</table>
<p><strong>Text location.</strong> The location of the text being referred to. This field is required for all entries.</p>
<table cellpadding="3">
<!-- cols="15 85" -->
<tr>
<td valign="top"><em>*FILE</em></td>
<td valign="top">The text is stored in a file.</td>
</tr>
<tr>
<td valign="top"><em>*PREVIOUS</em></td>
<td valign="top">The text is a copy of the previous view text. The previous view is specified when the view is created.</td>
</tr>
<tr>
<td valign="top"><em>*SUPPLIED</em></td>
<td valign="top">The text is supplied by the API user within the supplied text buffer parameter. The text that is supplied by the using program must be in the suppled text buffer parameter and referred to by a text descriptor within the text descriptor buffer parameter.</td>
</tr>
<tr>
<td valign="top"><em>*BLANK</em></td>
<td valign="top">The text consists of blank lines. The number of blank lines inserted is specified by the number of lines field.</td>
</tr>
</table>
<br><br>
<h3>Error Messages</h3>
<table width="100%" cellpadding="3">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top">Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</tr>
<tr>
<td align="left" valign="top">CPF3C21 E</td>
<td valign="top">Format name &amp;1 is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF1 E</td>
<td valign="top">Error code parameter not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF2 E</td>
<td valign="top">Error(s) occurred during running of &amp;1 API.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9542 E</td>
<td valign="top">View not found.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9545 E</td>
<td valign="top">No previous view.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9549 E</td>
<td valign="top">Error addressing API parameter.</td>
</tr>
<tr>
<td align="left" valign="top">CPF954E E</td>
<td valign="top">Text location is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9551 E</td>
<td valign="top">File not found.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9552 E</td>
<td valign="top">Cannot map between views.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9556 E</td>
<td valign="top">API not valid at this time.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9557 E</td>
<td valign="top">View already contains text descriptors.</td>
</tr>
<tr>
<td align="left" valign="top">CPF955B E</td>
<td valign="top">Number of entries not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF955C E</td>
<td valign="top">Supplied Text Length parameter not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF955D E</td>
<td valign="top">View data overflow. All debug data lost.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9569 E</td>
<td valign="top">Missing supplied text.</td>
</tr>
<tr>
<td align="left" valign="top">CPF956A E</td>
<td valign="top">No such text in previous view.</td>
</tr>
</table>
<br>
<hr>
API introduced: V4R2
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center">
<a href="#top_Of_Page">Top</a> |
<a href="debug1.htm">Debugger APIs</a> |
<a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</center>
<br>
</body>
</html>