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

412 lines
12 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 Job Status (QWCRJBST) 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. -->
<!-- WM SCRIPT A converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- File cleanup completed Nov 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 type="text/javascript" language="Javascript" src="../rzahg/synch.js">
</script>
<h2>Retrieve Job Status (QWCRJBST) 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">Job identifier</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(*)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Format of job identifier</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">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: No<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Retrieve Job Status (QWCRJBST) API returns status and job identification
information about the job that is identified by the job identifier parameter.
The QWCRJBST API retrieves this information faster than other APIs. It should
be considered for use in performance critical applications where the returned
information is required.</p>
<br>
<h3>Authorities and Locks</h3>
<p>None.</p>
<br>
<h3>Required Parameter Group</h3>
<dl>
<dt><strong>Receiver variable</strong></dt>
<dd>OUTPUT; CHAR(*)
<p>The receiver variable that receives the information requested. You can
specify the size of the area to be smaller than the format requested as long as
you specify the length parameter correctly. As a result, the API returns only
the data that the area can hold.</p>
</dd>
<dt><strong>Length of receiver variable</strong></dt>
<dd>INPUT BINARY(4)
<p>The length of the receiver variable provided. The length of receiver
variable parameter may be specified up to the size of the receiver variable
specified in the user program. If the length of receiver variable parameter
specified is larger than the allocated size of the receiver variable specified
in the user program, the results are not predictable. The minimum length is 8
bytes.</p>
</dd>
<dt><strong>Job identifier</strong></dt>
<dd>INPUT CHAR(*)
<p>The identifier of the job for which the information is to be retrieved. The
job can be identified in one of three ways: job number only, internal job
number, or fully qualified job name. The next parameter specifies which format
of job identifier is being used.</p>
</dd>
<dt><strong>Format of job identifier</strong></dt>
<dd>INPUT CHAR(8)
<p>The format of the job identifier being provided. The format names that can
be used are as follows:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>JOBS0100</em></td>
<td align="left" valign="top">The job identifier is a 6-character job number.
It is possible that more than one job may have the same job number. This API
returns the requested information for only the first job that has the specified
job number. No indication is returned to show if more than one job has the same
job number.</td>
</tr>
<tr>
<td align="left" valign="top"><em>JOBS0200</em></td>
<td align="left" valign="top">The job identifier is a 16-character internal job
number. The internal job number is obtained through the List Job (QUSLJOB) API
or as output to this API.</td>
</tr>
<tr>
<td align="left" valign="top"><em>JOBS0300</em></td>
<td align="left" valign="top">The job identifier is a 26-character fully
qualified job name.</td>
</tr>
</table>
<br>
</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_247">Format of Returned Information</a></h3>
<p>The information returned from this API has the following format:</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">Job status</td>
</tr>
<tr>
<td align="center" valign="top">18</td>
<td align="center" valign="top">12</td>
<td align="left" valign="top">CHAR(16)</td>
<td align="left" valign="top">Internal job identifier</td>
</tr>
<tr>
<td align="center" valign="top">34</td>
<td align="center" valign="top">22</td>
<td align="left" valign="top">CHAR(26)</td>
<td align="left" valign="top">Fully qualified job name</td>
</tr>
</table>
<br>
<br>
<h3><a name="Header_248">Field Description</a></h3>
<p><strong>Bytes available.</strong> The number of bytes of data available to
be returned. All available data is returned if enough space is provided.</p>
<p><strong>Bytes returned.</strong> The number of bytes of data returned.</p>
<p><strong>Fully qualified job name.</strong> The fully qualified job name
consisting of three parts. The first 10 characters contain the job name. The
next 10 characters contain the user name. The last 6 characters contain the job
number.</p>
<p><strong>Internal job identifier.</strong> A value sent to other APIs to
speed the process of locating the job on the system. Only APIs described in
this book use this identifier. The identifier is not valid following an initial
program load (IPL). If you attempt to use it after an IPL, an exception
occurs.</p>
<p><strong>Job status.</strong> Possible values that can be returned for job
status are as follows:</p>
<table cellpadding="5">
<!-- cols="10 90" -->
<tr>
<td align="left" valign="top"><em>*ACTIVE</em></td>
<td align="left" valign="top">The job has started, and it can use system
resources (processing unit, main storage, and so on). This does not guarantee
that the job is currently running, however. For example, an active job may be
in one of the following states where it cannot use system resources:
<ul>
<li>The Hold Job (HLDJOB) command holds the job; the Release Job (RLSJOB)
command allows the job to run again.</li>
<li>The Transfer Group Job (TFRGRPJOB) command or the Transfer Secondary Job
(TFRSECJOB) command suspends the job. When control returns to the job, the job
can run again.</li>
<li>The job is disconnected using the Disconnect Job (DSCJOB) command. When the
interactive user signs back on, thereby connecting back into the job, the job
can run again.</li>
<li>The job is waiting for any reason. For example, with an inquiry message,
the job can start running again when it receives the reply.</li>
</ul>
</td>
</tr>
<tr>
<td align="left" valign="top"><em>*JOBQ</em></td>
<td align="left" valign="top">The job currently is on a job queue. The job may
have been previously active and was placed back on the job queue because of the
Transfer Job (TFRJOB) command or the Transfer Batch Job (TFRBCHJOB) command, or
the job was never active because it was just submitted.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*OUTQ</em></td>
<td align="left" valign="top">The job has completed running and has spooled
output that has not yet printed.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*ERROR</em></td>
<td align="left" valign="top">Either a job with the specified job identifier
does not exist, or an error was encountered while attempting to determine its
status.</td>
</tr>
</table>
<br>
<br>
<h3>Error Messages</h3>
<table width="100%" cellpadding="5">
<!-- cols="15 85" -->
<tr>
<th align="left" valign="top" nowrap>Message ID</th>
<th align="left" valign="top">Error Message Text</th>
</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">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">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">CPF3C36 E</td>
<td align="left" valign="top">Number of parameters, &amp;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">CPF3C51 E</td>
<td align="left" valign="top">Internal job identifier not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C52 E</td>
<td align="left" valign="top">Internal job identifier no longer valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C53 E</td>
<td align="left" valign="top">Job &amp;3/&amp;2/&amp;1 not found.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C54 E</td>
<td align="left" valign="top">Job &amp;3/&amp;2/&amp;1 currently not
available.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C55 E</td>
<td align="left" valign="top">Job &amp;3/&amp;2/&amp;1 does not exist.</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: V3R6
<hr>
<table align="center" cellpadding="2" cellspacing="2">
<tr align="center">
<td valign="middle" align="center"><a href="#Top">Top</a> | <a href="wm1.htm">
Work Management APIs</a> | <a href="aplist.htm">APIs by category</a></td>
</tr>
</table>
</body>
</html>