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

387 lines
11 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>Retrieve Prompt Override (QPTRTVPO) API</title>
<!-- Begin Header Records --><!-- Created by Julia Accola for V5R1-->
<!-- 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. -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!--Edited by Kersten Nov 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 type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<h2>Retrieve Prompt Override (QPTRTVPO) API</h2>
<div class="box" style="width: 80%;">
<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">Receiver variable 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">4</td>
<td align="left" valign="top">Command string</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Length of command string</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">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;Threadsafe: Yes. See <a href="#usage_notes">Usage Notes</a> for prompt
override program considerations.<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Retrieve Prompt Override (QPTRTVPO) API calls the prompt override
program for a specified command and returns the prompt override command string
from the prompt override program.</p>
<br>
<h3>Authorities and Locks</h3>
<dl>
<dt><em>Command</em></dt>
<dd>*USE</dd>
<dt><em>Prompt override program</em></dt>
<dd>*EXECUTE</dd>
<dt><em>Library</em></dt>
<dd>*EXECUTE</dd>
</dl>
<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. The minimum size
of this area is 8 bytes. You can specify the size of this area to be smaller
than the format requested as long as you specify the length parameter
correctly. The API will not attempt to return more data than the receiver can
hold.</p>
</dd>
<dt><strong>Length of receiver variable</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the receiver variable. If this value is larger than the actual
size of the receiver variable, the results may not be predictable. The minimum
length is 8 bytes.</p>
</dd>
<dt><strong>Receiver variable format name</strong></dt>
<dd>INPUT; CHAR(8)
<p>The format of the receiver variable. RTVP0100 is the only valid value. For
more information, see <a href="#HDRFMT2">RTVP0100 Format</a>.</p>
</dd>
<dt><strong>Command string</strong></dt>
<dd>INPUT; CHAR(*)
<p>The command string containing the command name and the key parameter values.
The command name may be library-qualified. The command string should be in the
format in which it would be entered on a command line. Values must be specified
for all key parameters.</p>
</dd>
<dt><strong>Length of command string</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the command string. Valid valids are between 1 and 32 702. The
length can include trailing blanks but must not include trailing null
characters.</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="HDRFMT2">RTVP0100 Format</a></h3>
<p>The RTVP0100 format includes information on the contents of the receiver
variable. The following table shows how this information is organized. For
detailed descriptions of the fields in the list, see <a href="#HDRFMTFLD">Field
Descriptions</a>.</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">CHAR(10)</td>
<td align="left" valign="top">Prompt override program name</td>
</tr>
<tr>
<td align="center" valign="top">18</td>
<td align="center" valign="top">12</td>
<td align="left" valign="top">CHAR(10)</td>
<td align="left" valign="top">Prompt override program library</td>
</tr>
<tr>
<td align="center" valign="top">28</td>
<td align="center" valign="top">1C</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Offset to prompt override command string</td>
</tr>
<tr>
<td align="center" valign="top">32</td>
<td align="center" valign="top">20</td>
<td align="left" valign="top">BINARY(4)</td>
<td align="left" valign="top">Length of prompt override command string</td>
</tr>
<tr>
<td align="center" valign="top">*</td>
<td align="center" valign="top">*</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Prompt override command string</td>
</tr>
</table>
<br>
<h3><a name="HDRFMTFLD">Field Descriptions</a></h3>
<p><strong>Bytes available.</strong> The length of all data available for the
requested format. All available data is returned if enough space is
provided.</p>
<p><strong>Bytes returned.</strong> The length of all data actually returned.
If the receiver variable is not large enough to hold the data, no other data is
returned and this value is less than the bytes available.</p>
<p><strong>Length of prompt override command string.</strong> The length of the
prompt override command string returned by the API. If the prompt override
program completed normally, but did not return a command string, this will be
0. If the prompt override program ended in error, this will be -1.</p>
<p><strong>Offset to prompt override command string.</strong> Offset to the
first byte of the prompt override command string.</p>
<p><strong>Prompt override command string.</strong> The command string returned
by the prompt override program. The command string will not include the command
name, the key parameters, or any other parameters not specified by the prompt
override program. If the receiver is not large enough to hold the entire
command string, the command string will not be returned, and the Bytes
available field will have the size of the receiver value required for the
command string.</p>
<p><strong>Prompt override program library name.</strong> The name of the
library in which the prompt override program was found.</p>
<p><strong>Prompt override program name.</strong> The name of the prompt
override program that was called to supply the prompt override command
string.</p>
<br>
<h3><a name="usage_notes">Usage Notes</a></h3>
<p>While this API is threadsafe, it should not be used to call a prompt
override program that is not threadsafe in a multithreaded job.</p>
<br>
<h3>Error Messages</h3>
<table width="100%">
<tr>
<td width="15%" valign="top">CPF0001 E</td>
<td width="85%" valign="top">Error found on &amp;1 command.</td>
</tr>
<tr>
<td align="left" valign="top">CPF24B4 E</td>
<td align="left" valign="top">Severe error while addressing parameter
list.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C1D E</td>
<td align="left" valign="top">Length specified in parameter &amp;1 not
valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C19 E</td>
<td align="left" valign="top">Error occurred with receiver variable
specified.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C20 E</td>
<td align="left" valign="top">Error found by program &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C21 E</td>
<td align="left" valign="top">Format name &amp;1 is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C24 E</td>
<td align="left" valign="top">Length of the receiver variable is not
valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF1 E</td>
<td align="left" valign="top">Error code parameter not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3CF2 E</td>
<td align="left" valign="top">Error(s) occurred during running of &amp;1
API.</td>
</tr>
<tr>
<td align="left" valign="top">CPF6802 E</td>
<td align="left" valign="top">Error calling prompt override program.</td>
</tr>
<tr>
<td align="left" valign="top">CPF6803 E</td>
<td align="left" valign="top">Required key parameter not specified.</td>
</tr>
<tr>
<td align="left" valign="top">CPF6804 E</td>
<td align="left" valign="top">No prompt override program for command.</td>
</tr>
<tr>
<td align="left" valign="top">CPF680A E</td>
<td align="left" valign="top">Current values could not be retrieved.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9872 E</td>
<td align="left" valign="top">Program or service program &amp;1 in library
&amp;2 ended. Reason code &amp;3.</td>
</tr>
</table>
<br>
<hr>
API introduced: V5R1
<hr>
<center>
<table cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
"pgm1.htm">Program and CL Command APIs</a> | <a href="aplist.htm">APIs by
category</a></td>
</tr>
</table>
</center>
</body>
</html>