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

490 lines
13 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 Data Area (QWCRDTAA) 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 -->
<!-- File cleanup completed on 16 July 2001 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- File cleanup completed Feb 2002 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 Data Area (QWCRDTAA) 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">Qualified data area name</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(20)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Starting position</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">Length of data</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: Conditional; see <a href="#Header_204">Usage Notes</a><br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Retrieve Data Area (QWCRDTAA) API allows you to retrieve the contents of
a data area. Distributed data management (DDM) data areas are supported by this
API. In other words, this API can retrieve a data area value from a data area
that exists on a remote i5/OS.</p>
<br>
<h3>Authorities and Locks</h3>
<dl>
<dt><em>Library Authority</em></dt>
<dd>*EXECUTE</dd>
<dt><em>Data Area Authority</em></dt>
<dd>*USE</dd>
<dt><em>Data Area Lock</em></dt>
<dd>*SHRRD</dd>
</dl>
<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. For the format, see <a href="#HDRRECVAR1">
Format of Data Returned</a>.</p>
</dd>
<dt><strong>Length of receiver variable</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the receiver variable described in <a href="#HDRRECVAR1">
Format of Data Returned</a>. If the length is larger than the size of the
receiver variable, the results may not be predictable. The minimum length is 8
bytes.</p>
</dd>
<dt><strong>Qualified data area name</strong></dt>
<dd>INPUT; CHAR(20)
<p>The first 10 characters contain the data area name, and the second 10
characters contain the name of the library where the data area is located.</p>
<p>When one of the special values is specified, the library name must be blank.
The special values for the data area are:</p>
<table cellpadding="5">
<!-- cols="10 90" -->
<tr>
<td align="left" valign="top"><em>*LDA</em></td>
<td align="left" valign="top">Local data area</td>
</tr>
<tr>
<td align="left" valign="top"><em>*GDA</em></td>
<td align="left" valign="top">Group data area</td>
</tr>
<tr>
<td align="left" valign="top"><em>*PDA</em></td>
<td align="left" valign="top">Program initialization parameter data area</td>
</tr>
</table>
<p>The special values supported for the library name are:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>*LIBL</em></td>
<td align="left" valign="top">The library list.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*CURLIB</em></td>
<td align="left" valign="top">The job's current library.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Starting position</strong></dt>
<dd>INPUT; BINARY(4)
<p>The first byte of the data area to be retrieved. A value of 1 will identify
the first character in the data area. The maximum value allowed for the
starting position is 2000. A value of -1 will return all the characters in the
data area.</p>
</dd>
<dt><strong>Length of data</strong></dt>
<dd>INPUT; BINARY(4)
<p>The length of the data area substring to be retrieved. The length of data
parameter must be greater than 0. If the length of data parameter is greater
than the size of the data area, the receiver variable is padded with
blanks.</p>
<p>The length of data parameter added to the starting position minus one must
be between the substring starting position and the data area end; otherwise,
CPF1089 (Substring specified for data area not valid) is issued. If you have a
small data area and only want the fixed portion of the data returned, you must
code -1 for the starting position.</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="HDRRECVAR1">Format of Data Returned</a></h3>
<p>The receiver variable holds the information returned for the data area. The
following table shows the format of the receiver variable.</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 available</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 returned</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">Type of value returned</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">Library name</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">Length of value returned</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">Number of decimal positions</td>
</tr>
<tr>
<td align="center" valign="top">36</td>
<td align="center" valign="top">24</td>
<td align="left" valign="top">CHAR(*)</td>
<td align="left" valign="top">Value</td>
</tr>
</table>
<br>
<br>
<h3><a name="Header_203">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 receiver variable was not sufficiently
large to hold all of the data available, this value will be less than the bytes
available.</p>
<p><strong>Length of value returned.</strong> The length of the value that was
returned.</p>
<p><strong>Library name.</strong> The name of the library where the data area
was found. This field will be blank if one of the special values was specified
for the first ten characters of the qualified data area name.</p>
<p><strong>Number of decimal positions.</strong> The number of decimal
positions.</p>
<p><strong>Type of value returned.</strong> The following values may be
returned.</p>
<table cellpadding="5">
<!-- cols="10 90" -->
<tr>
<td align="left" valign="top"><em>*CHAR</em></td>
<td align="left" valign="top">A character data area.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*DEC</em></td>
<td align="left" valign="top">A decimal data area. The value returned will be a
packed decimal value.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*LGL</em></td>
<td align="left" valign="top">A logical data area.</td>
</tr>
</table>
<p><strong>Value.</strong> The contents of the data area.</p>
<br>
<h3><a name="Header_204">Usage Notes</a></h3>
<p>This API is threadsafe, except in the following situations:</p>
<ul>
<li>The retrieval of DDM data areas in a job that allows multiple threads is
not threadsafe.</li>
<li>The retrieval of DDM data areas will not be allowed when more than one
thread is active in a job.</li>
</ul>
<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">CPF101A E</td>
<td align="left" valign="top">Operation on DDM data area &amp;1 in &amp;2
failed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1015 E</td>
<td align="left" valign="top">Data area &amp;1 in &amp;2 not found.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1016 E</td>
<td align="left" valign="top">No authority to data area &amp;1 in &amp;2.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1021 E</td>
<td align="left" valign="top">Library &amp;1 not found for data area
&amp;2.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1022 E</td>
<td align="left" valign="top">No authority to library &amp;1 data area
&amp;2.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1046 E</td>
<td align="left" valign="top">DTAARA(*GDA) not valid because job not group
job.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1063 E</td>
<td align="left" valign="top">Cannot allocate data area &amp;1 in library
&amp;2.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1067 E</td>
<td align="left" valign="top">Cannot allocate library &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1072 E</td>
<td align="left" valign="top">DTAARA(*PDA) not valid because job not prestart
job.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1088 E</td>
<td align="left" valign="top">Starting position outside of data area.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1089 E</td>
<td align="left" valign="top">Substring specified for data area not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF180B E</td>
<td align="left" valign="top">Function &amp;1 not allowed.</td>
</tr>
<tr>
<td align="left" valign="top">CPF1863 E</td>
<td align="left" valign="top">Length of value 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">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">CPF3C24 E</td>
<td align="left" valign="top">Length of the receiver variable is 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 &amp;1 in library
&amp;2 ended. Reason code &amp;3.</td>
</tr>
</table>
<br>
<hr>
API introduced: V2R3
<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>