599 lines
18 KiB
HTML
599 lines
18 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 Request Message (QMHRTVRQ) 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. -->
|
|
<!-- MH1TEMP SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
|
|
<!-- RCHVMW2 on 26 Jan 1999 at 10:37:34 -->
|
|
<!-- Change History: -->
|
|
<!-- YYMMDD USERID Change description -->
|
|
<!--File Edited Oct 2001 by v2cdijab -->
|
|
<!--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 Request Message (QMHRTVRQ) API</h2>
|
|
|
|
<div class="box" style="width: 70%;">
|
|
<br>
|
|
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%">Message information</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 message information</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">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">Message type</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Char(10)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">5</td>
|
|
<td align="left" valign="top">Message key</td>
|
|
<td align="left" valign="top">Input</td>
|
|
<td align="left" valign="top">Char(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/0</td>
|
|
<td align="left" valign="top">Char(*)</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: Yes<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>The Retrieve Request Message (QMHRTVRQ) API retrieves request messages from
|
|
the current job's job message queue. Only request messages (commands) that have
|
|
been received are retrieved; new request messages and all other types of
|
|
messages are bypassed. One use for this API is in programs that support a
|
|
retrieve key on a command line to retrieve commands previously run.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Authorities and Locks</h3>
|
|
|
|
<p>None.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Required Parameter Group</h3>
|
|
|
|
<dl>
|
|
<dt><strong>Message information</strong></dt>
|
|
|
|
<dd>OUTPUT; CHAR(*)
|
|
|
|
<p>The variable that is to receive information about the request message. The
|
|
minimum size for this area is 8 bytes. If the size of this area is smaller than
|
|
the available message information, the API returns only the data that the area
|
|
can hold. If no request message could be retrieved from the job message queue,
|
|
no error is returned. (For example, there are no request messages prior to or
|
|
after the one identified by the message key passed in.) Instead, bytes
|
|
available is set to 0 to indicate no message was found.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Length of message information</strong></dt>
|
|
|
|
<dd>INPUT; BINARY(4)
|
|
|
|
<p>The size of the area to contain the message information, in bytes. The
|
|
minimum size is 8. If this value is larger than the actual size of the storage
|
|
allocated for the message information parameter, the result may not be
|
|
predictable.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Format name</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(8)
|
|
|
|
<p>The format of the message information to be returned.</p>
|
|
|
|
<p>Valid formats are:</p>
|
|
|
|
<table cellpadding="5">
|
|
<!-- cols="15 85" -->
|
|
<tr>
|
|
<td align="left" valign="top"><em>RTVQ0100</em></td>
|
|
<td align="left" valign="top">Basic request message information.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>RTVQ0200</em></td>
|
|
<td align="left" valign="top">All request message information.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong>Message type</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(10)
|
|
|
|
<p>The message to be retrieved.</p>
|
|
|
|
<p>The valid values follow:</p>
|
|
|
|
<table cellpadding="5">
|
|
<!-- cols="15 85" -->
|
|
<tr>
|
|
<td align="left" valign="top"><em>*FIRST</em></td>
|
|
<td align="left" valign="top">Retrieve the first request message in the current
|
|
job.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>*LAST</em></td>
|
|
<td align="left" valign="top">Retrieve the last request message in the current
|
|
job.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>*NEXT</em></td>
|
|
<td align="left" valign="top">Retrieve the request message after the message
|
|
indicated by the message key parameter. Message key is required when *NEXT is
|
|
used.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>*PRV</em></td>
|
|
<td align="left" valign="top">Retrieve the request message before the message
|
|
indicated by the message key parameter. Message key is required when *PRV is
|
|
used.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
</dd>
|
|
|
|
<dt><strong>Message key</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(4)
|
|
|
|
<p>A value must be specified for this parameter when the message type parameter
|
|
is *NEXT or *PRV and is used to retrieve the request message after or before
|
|
the message with this key. This message key need not refer to a message on the
|
|
job message queue. The search begins with the message on the queue that has the
|
|
key closest to this value. This value must be blank when the message type
|
|
parameter is *FIRST or *LAST.</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="HDRRTVRQ10">RTVQ0100 Format</a></h3>
|
|
|
|
<p>The following table describes the information that is returned in the
|
|
message information parameter for the RTVQ0100 format. For detailed
|
|
descriptions of the fields, see <a href="#HDRRTVRQDE">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(4)</td>
|
|
<td align="left" valign="top">Message key</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">12</td>
|
|
<td align="center" valign="top">C</td>
|
|
<td align="left" valign="top">CHAR(20)</td>
|
|
<td align="left" valign="top">Reserved</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 request message text returned</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">36</td>
|
|
<td align="center" valign="top">24</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Length of request message text available</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">40</td>
|
|
<td align="center" valign="top">28</td>
|
|
<td align="left" valign="top">CHAR(*)</td>
|
|
<td align="left" valign="top">Request message text</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<br>
|
|
|
|
|
|
<h3><a name="HDRRTVRQ20">RTVQ0200 Format</a></h3>
|
|
|
|
<p>The following table describes the information that is returned in the
|
|
message information parameter for the RTVQ0200 format. For detailed
|
|
descriptions of the fields, see <a href="#HDRRTVRQDE">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(4)</td>
|
|
<td align="left" valign="top">Message key</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">12</td>
|
|
<td align="center" valign="top">C</td>
|
|
<td align="left" valign="top">CHAR(10)</td>
|
|
<td align="left" valign="top">Program name or ILE service program name</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">22</td>
|
|
<td align="center" valign="top">16</td>
|
|
<td align="left" valign="top">CHAR(1)</td>
|
|
<td align="left" valign="top">Call stack entry type</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">23</td>
|
|
<td align="center" valign="top">17</td>
|
|
<td align="left" valign="top">CHAR(10)</td>
|
|
<td align="left" valign="top">Module name</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">33</td>
|
|
<td align="center" valign="top">21</td>
|
|
<td align="left" valign="top">CHAR(256)</td>
|
|
<td align="left" valign="top">Procedure name</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">289</td>
|
|
<td align="center" valign="top">121</td>
|
|
<td align="left" valign="top">CHAR(11)</td>
|
|
<td align="left" valign="top">Reserved</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">300</td>
|
|
<td align="center" valign="top">12C</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Offset to long procedure name</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">304</td>
|
|
<td align="center" valign="top">130</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Length of long procedure name</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">308</td>
|
|
<td align="center" valign="top">134</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Length of request message text returned</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">312</td>
|
|
<td align="center" valign="top">138</td>
|
|
<td align="left" valign="top">BINARY(4)</td>
|
|
<td align="left" valign="top">Length of request message text available</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">316</td>
|
|
<td align="center" valign="top">13C</td>
|
|
<td align="left" valign="top">CHAR(*)</td>
|
|
<td align="left" valign="top">Request message text</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top"><br>
|
|
</td>
|
|
<td align="center" valign="top"><br>
|
|
</td>
|
|
<td align="left" valign="top">CHAR(*)</td>
|
|
<td align="left" valign="top">Long procedure name</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<br>
|
|
|
|
|
|
<h3><a name="HDRRTVRQDE">Field Descriptions</a></h3>
|
|
|
|
<p><strong>Bytes available.</strong> The length of all data available to
|
|
return. 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 data is truncated because the length of message information parameter
|
|
did not specify an area large enough to hold the data, this value is less than
|
|
bytes available. When no request messages could be retrieved from the job
|
|
message queue, the following occurs:</p>
|
|
|
|
<ul>
|
|
<li>The value of the bytes returned field is set to 8.</li>
|
|
|
|
<li>The value of the bytes available field is set to 0.</li>
|
|
|
|
<li>The remaining fields are unchanged.</li>
|
|
</ul>
|
|
|
|
<p><strong>Call stack entry type.</strong> The type of call stack entry
|
|
receiving the message.</p>
|
|
|
|
<p>The possible values follow:</p>
|
|
|
|
<table cellpadding="5">
|
|
<!-- cols="5 95" -->
|
|
<tr>
|
|
<td align="left" valign="top"><em>0</em></td>
|
|
<td align="left" valign="top">The receiving call stack entry is an original
|
|
program model (OPM) program.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>1</em></td>
|
|
<td align="left" valign="top">The receiving call stack entry is a procedure
|
|
within an ILE program, and the procedure name is up to and including 256
|
|
characters in length.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top"><em>2</em></td>
|
|
<td align="left" valign="top">The receiving call stack entry is a procedure
|
|
within an ILE program, and the procedure name is 257 through 4096 characters in
|
|
length. For this type, the procedure name field is blank and the name can be
|
|
obtained from the long procedure name.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<p><strong>Length of long procedure name.</strong> The length of the procedure
|
|
name, in bytes. If the message was sent to an original program model (OPM)
|
|
program, this field is zero.</p>
|
|
|
|
<p><strong>Length of request message text available.</strong> The length of all
|
|
available request message text, in bytes.</p>
|
|
|
|
<p><strong>Length of request message text returned.</strong> The actual length
|
|
of data in the request message text field. If the returned length is equal to
|
|
the available length, all request message text was returned. If the message
|
|
information parameter is not sufficiently large to hold all the text, the
|
|
returned length is less than the available length and the text is
|
|
truncated.</p>
|
|
|
|
<p><strong>Long procedure name.</strong> The complete procedure name that
|
|
received the message. A nested procedure name has each procedure name separated
|
|
by a colon. The outermost procedure name is identified first followed by the
|
|
procedures it contains. The innermost procedure is identified last in the
|
|
string.</p>
|
|
|
|
<p>If the message was sent to an OPM program, this field is not used. The
|
|
offset to long procedure name field and the length of long procedure name field
|
|
are zero.</p>
|
|
|
|
<p><strong>Message key.</strong> The key to the request message retrieved. This
|
|
value can be used on subsequent calls to this API using *NEXT or *PRV in the
|
|
message type parameter. This retrieves the next or previous request message on
|
|
the job message queue. It can also be used on the Receive Program Message
|
|
(QMHRCVPM) API to get more information about the request message.</p>
|
|
|
|
<p><strong>Module name.</strong> The name of the module that contains the ILE
|
|
procedure receiving the message. If the message was sent to an OPM program,
|
|
this field is blank.</p>
|
|
|
|
<p><strong>Offset to long procedure name.</strong> The offset to the procedure
|
|
name, in bytes. If the message was sent to an OPM program, this field is zero.
|
|
If the message information parameter is not large enough to contain any of the
|
|
long procedure name field, this offset is set to zero.</p>
|
|
|
|
<p><strong>Procedure name.</strong> The name of the ILE procedure receiving the
|
|
message. When the call stack entry type is 0 or 2, this field is blank. A
|
|
nested procedure name has each procedure name separated by a colon. The
|
|
outermost procedure name is identified first followed by the procedures it
|
|
contains. The innermost procedure is identified last in the string.</p>
|
|
|
|
<p><strong>Program name or ILE service program name.</strong> The name of the
|
|
program receiving the request message, or the name of the ILE program that
|
|
contains the procedure receiving the message.</p>
|
|
|
|
<p><strong>Request message text.</strong> The text of the request message. If
|
|
you are retrieving CL commands, the maximum length of a CL command is 6000
|
|
bytes.</p>
|
|
|
|
<p><strong>Reserved.</strong> An ignored field.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Error Messages</h3>
|
|
|
|
<table width="100%" cellpadding="5">
|
|
<!-- 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" width="15%">CPF24AF E</td>
|
|
<td align="left" valign="top" width="85%">Message key not allowed with message
|
|
type specified.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF24A7 E</td>
|
|
<td align="left" valign="top">Value for the length of message information not
|
|
valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF24B3 E</td>
|
|
<td align="left" valign="top">Message type &1 not valid.</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">CPF3CF1 E</td>
|
|
<td align="left" valign="top">Error code parameter not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF3C21 E</td>
|
|
<td align="left" valign="top">Format name &1 is not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF3C36 E</td>
|
|
<td align="left" valign="top">Number of parameters, &1, entered for this
|
|
API was not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF3C90 E</td>
|
|
<td align="left" valign="top">Literal value cannot be changed.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="left" valign="top">CPF9872 E</td>
|
|
<td align="left" valign="top">Program or service program &1 in library
|
|
&2 ended. Reason code &3.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
|
|
<hr>
|
|
API introduced: V2R2
|
|
|
|
<hr>
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<tr align="center">
|
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
|
"mh1.htm">Message Handling APIs</a> | <a href="aplist.htm">APIs by
|
|
category</a></td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
</body>
|
|
</html>
|
|
|