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

623 lines
19 KiB
HTML
Raw Permalink Normal View History

2024-04-02 14:02:31 +00:00
<!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>Retrieve View Text (QteRetrieveViewText) 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>Retrieve View Text (QteRetrieveViewText) 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%">Receiver variable</td>
<td align="left" valign="top" width="20%">Output</td>
<td align="left" valign="top" width="20%">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">2</td>
<td align="left" valign="top">Length of receiver variable</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">View ID</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">Start line number</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Number of lines</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="left" valign="top">Line length</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;Service Program: QTEDBGS<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Retrieve View Text (QteRetrieveViewText) API is used to retrieve source text from a specified view. This text may be formatted and displayed by the user of this API. The caller must specify the following:</p>
<ul>
<li>A registered view ID<br><br></li>
<li>The starting line number to be retrieved<br><br></li>
<li>The number of lines of text to retrieve<br><br></li>
<li>A buffer to contain the text retrieved</li>
</ul>
<p>All text retrieved, whether it comes from files or as text supplied by a processor, is in the CCSID of the job.</p>
<p>If source files have changed since the view was created, diagnostic messages CPF9561 (for i5/OS files) and CPF9596 (for i5/OS integrated file system files) are sent to the calling program's message queue for each file. Error messages CPF9566 (for i5/OS files) and CPF9597 (for i5/OS integrated file system files) also are issued, and all of the text available is retrieved. The calling program should warn the user that the view text may be incorrect.</p>
<p>If a source file cannot be accessed because it is deleted or the user is not authorized, error messages CPF9565 (for i5/OS files) and CPF9598 (for i5/OS integrated file system files) are issued. No more text is retrieved. Text up to that file is retrieved and this is indicated in the fields of the receiver variable. If the calling program attempts to read text in the view following the file, the starting line number can be set to a line after the file. The number of lines in the file that should have been read is returned in the exception data. This allows the calling program to skip over this file if desired.</p>
<p>It is suggested that the calling program buffer the retrieved text to minimize use of this API. Source files accessed by this API do not remain open across API calls. Performance degradation occurs for every use of the API that results in file access because of opening and closing files.</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>Receiver variable</strong></dt>
<dd>OUTPUT; CHAR(*)
<p>The variable that is to receive the information requested. You can specify the size of this area to be smaller than the format requested if you specify the length of receiver variable parameter correctly. As a result, the API returns only the data that the area can hold. For more information, see <a href="#HDRF1RMRV">Format of Receiver Variable</a>.</p>
</dd>
<dt><strong>Length of receiver variable</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the receiver variable parameter. The minimum length is 8 bytes.</p>
</dd>
<dt><strong>View ID</strong></dt>
<dd>INPUT; BINARY(4)
<p>The identifier of a previously registered view obtained by using the Register Debug View API.</p>
</dd>
<dt><strong>Start line number</strong></dt>
<dd>INPUT; BINARY(4)
<p>The number of the first line to be retrieved.</p>
</dd>
<dt><strong>Number of lines</strong></dt>
<dd>INPUT; BINARY(4)
<p>The number of lines of source text to be retrieved. This number includes the line specified in the start line number parameter. Fewer than the number of lines may be placed in the receiver variable if fewer lines than requested are available. No more than the number of lines specified is placed in the receiver variable.</p>
<p>The following special value is supported for this parameter:</p>
<table cellpadding="3">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>0</em></td>
<td valign="top">All of the text associated with this view should be retrieved.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Line length</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of each line of text to be retrieved. Each line takes exactly this many characters. If the actual line of text is shorter, it is padded to the right with blanks. If the line is longer than this length, it is truncated to fit. The line length must be a number from 1 through 255.</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="HDRF1RMRV">Format of Receiver Variable</a></h3>
<p>The following tables show the information supplied in the receiver
variable parameter. The information returned depends on the type of view
being used. For more information on each field, see <a href="#HDRHAHA2">
Field Descriptions</a>. For the listing view:</p>
<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%">Bytes returned</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">Bytes available</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of lines returned</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">Line length</td>
</tr>
<tr>
<td align="left" valign="top" colspan="4"><strong>Note:</strong> The
following field is repeated for each line returned. The number of
characters is equal to the line length.</td>
</tr>
<tr>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Listing view source line</td>
</tr>
</table>
<p>For the statement view:</p>
<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%">Bytes returned</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">Bytes available</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of lines returned</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">Line length</td>
</tr>
<tr>
<td align="left" valign="top" colspan="4"><strong>Note:</strong> The following fields are repeated for each line returned. The total number of characters in each line is equal to the line length (10 + 10 + 10 + * = line length).</td>
</tr>
<tr>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">Procedure dictionary number</td>
</tr>
<tr>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">Statement number</td>
</tr>
<tr>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">Statement type number</td>
</tr>
<tr>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Procedure name</td>
</tr>
</table>
<p>For the text view:</p>
<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%">Bytes returned</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">Bytes available</td>
</tr>
<tr>
<td align="center" valign="top">8</td>
<td align="center" valign="top">8</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Number of lines returned</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">Line length</td>
</tr>
<tr>
<td align="left" valign="top" colspan="4"><strong>Note:</strong> The following fields are repeated for each line returned.</td>
</tr>
<tr>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(12)</td>
<td align="left" valign="top">Sequence number</td>
</tr>
<tr>
<td align="center" valign="top">&nbsp;</td>
<td align="center" valign="top">&nbsp;</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Text view source line</td>
</tr>
</table>
<br><br>
<h3><a name="HDRHAHA2">Field Descriptions</a></h3>
<p><strong>Bytes available.</strong> The number of bytes of data available to be returned.</p>
<p><strong>Bytes returned.</strong> The number of bytes of data returned.</p>
<p><strong>Line length.</strong> The length of each line of text in the receiver variable parameter.</p>
<p><strong>Listing view source line.</strong> The text associated with each line retrieved. The number of characters in each line is equal to the line length.</p>
<p><strong>Number of lines returned.</strong> The number of lines of source text retrieved by this API and available in the receiver variable. This may be less than the number of lines requested or available, if the receiver variable is not large enough to hold the text requested.</p>
<p><strong>Procedure dictionary number.</strong> The number that uniquely identifies the procedure in this module. The number is left-justified and padded on the right with blanks. For OPM programs the procedure dictionary number is set to a value of 0.</p>
<p><strong>Procedure name.</strong> The name of the procedure. The name is left-justified and padded on the right with blanks. For OPM programs the procedure name is blanks.</p>
<p><strong>Sequence number.</strong> If the text is from a source physical file, these 12 bytes contain the sequence number and source date for that line. If the text is from an i5/OS integrated file system file, these 12 bytes are blank. If the text is supplied by the compiler, these 12 bytes are blank.</p>
<p><strong>Statement number.</strong> The number that uniquely identifies the statement in the procedure. The number is left-justified and padded on the right with blanks. This number is shown on the compiler listing. For OPM programs the statement number is the same as the machine interface (MI) number.</p>
<p><strong>Statement type number.</strong> The type of statement produced by the compiler. The number is left-justified and padded on the right with blanks. Possible values are:</p>
<table cellpadding="3">
<!-- cols="5 95" -->
<tr>
<td valign="top"><em>1</em></td>
<td valign="top">INIT CODE</td>
</tr>
<tr>
<td valign="top"><em>2</em></td>
<td valign="top">PROC ENTRY</td>
</tr>
<tr>
<td valign="top"><em>3</em></td>
<td valign="top">PROC EXIT</td>
</tr>
<tr>
<td valign="top"><em>4</em></td>
<td valign="top">ALLOC</td>
</tr>
<tr>
<td valign="top"><em>5</em></td>
<td valign="top">STMT</td>
</tr>
<tr>
<td valign="top"><em>6</em></td>
<td valign="top">ENTRY</td>
</tr>
<tr>
<td valign="top"><em>7</em></td>
<td valign="top">EXIT</td>
</tr>
<tr>
<td valign="top"><em>8</em></td>
<td valign="top">MULTIEXIT</td>
</tr>
<tr>
<td valign="top"><em>9</em></td>
<td valign="top">PATH LABEL</td>
</tr>
<tr>
<td valign="top"><em>10</em></td>
<td valign="top">PATH CALL BGN</td>
</tr>
<tr>
<td valign="top"><em>11</em></td>
<td valign="top">PATH CALL RET</td>
</tr>
<tr>
<td valign="top"><em>12</em></td>
<td valign="top">PATH DO BGN</td>
</tr>
<tr>
<td valign="top"><em>13</em></td>
<td valign="top">PATH TRUEIF</td>
</tr>
<tr>
<td valign="top"><em>14</em></td>
<td valign="top">PATH FALSEIF</td>
</tr>
<tr>
<td valign="top"><em>15</em></td>
<td valign="top">PATH WHEN BGN</td>
</tr>
<tr>
<td valign="top"><em>16</em></td>
<td valign="top">PATH OTHERW</td>
</tr>
<tr>
<td valign="top"><em>17</em></td>
<td valign="top">GOTO</td>
</tr>
<tr>
<td valign="top"><em>18</em></td>
<td valign="top">POST COMPOUND</td>
</tr>
</table>
<p><strong>Text view source line.</strong> The text associated with each line retrieved. The number of characters in each line equals the line length minus 12 bytes (the sequence number).</p>
<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">CPF3C24 E</td>
<td valign="top">Length of the receiver variable 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">CPF9541 E</td>
<td valign="top">Not in debug mode.</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">CPF9549 E</td>
<td valign="top">Error addressing API parameter.</td>
</tr>
<tr>
<td align="left" valign="top">CPF954A E</td>
<td valign="top">No source text available.</td>
</tr>
<tr>
<td align="left" valign="top">CPF954C E</td>
<td valign="top">Cannot retrieve text from file.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9560 E</td>
<td valign="top">Line length not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9561 E</td>
<td valign="top">Source file has changed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9563 E</td>
<td valign="top">Number of lines not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9564 E</td>
<td valign="top">Starting line number not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9565 E</td>
<td valign="top">Source cannot be accessed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9566 E</td>
<td valign="top">One or more source files have changed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9596 E</td>
<td valign="top">Source file has changed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9597 E</td>
<td valign="top">One or more source files have changed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9598 E</td>
<td valign="top">Source file cannot be accessed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF959A E</td>
<td valign="top">Source file type not valid.</td>
</tr>
</table>
<br>
<hr>
API introduced: V2R3
<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>