373 lines
10 KiB
HTML
373 lines
10 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 Program Associated Space (QCLRPGAS) 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. -->
|
||
|
<!-- QCLRPGA SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
|
||
|
<!-- RCHVMW2 on 5 Feb 1999 at 11:11:47 -->
|
||
|
<!-- Change History: -->
|
||
|
<!-- YYMMDD USERID Change description -->
|
||
|
<!--File Edited 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 language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
||
|
</script>
|
||
|
|
||
|
<h2>Retrieve Program Associated Space (QCLRPGAS) API</h2>
|
||
|
|
||
|
<div class="box" style="width: 80%;">
|
||
|
<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%">Output data buffer</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 output data buffer</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 program 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">Call stack counter</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">Data handle</td>
|
||
|
<td align="left" valign="top">Input</td>
|
||
|
<td align="left" valign="top">Char(16)</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="center" valign="top">6</td>
|
||
|
<td align="left" valign="top">Length of data available</td>
|
||
|
<td align="left" valign="top">Output</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>
|
||
|
Default Public Authority: *EXCLUDE<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
Threadsafe: No<br>
|
||
|
<!-- iddvc RMBR -->
|
||
|
<br>
|
||
|
</div>
|
||
|
|
||
|
<p>The Retrieve Program Associated Space (QCLRPGAS) API allows you to retrieve
|
||
|
information from the associated space of an original program model (OPM),
|
||
|
user-state program in the user domain. This API is intended to be used only on
|
||
|
programs created by the Create Program (QPRCRTPG) API.</p>
|
||
|
|
||
|
<p>This API is used to retrieve information that was previously stored in the
|
||
|
associated space. For example, it can be used by compilers at run time to
|
||
|
retrieve information about the compilation process that was previously stored.
|
||
|
The associated space of a program object is not a replacement for data areas or
|
||
|
user spaces. It is recommended for static data only.</p>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Authorities and Locks</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt><em>Program Library Authority</em></dt>
|
||
|
|
||
|
<dd>*USE</dd>
|
||
|
|
||
|
<dt><em>Program Authority</em></dt>
|
||
|
|
||
|
<dd>*ALL</dd>
|
||
|
|
||
|
<dt><em>Program Lock</em></dt>
|
||
|
|
||
|
<dd>*EXCLRD</dd>
|
||
|
</dl>
|
||
|
|
||
|
<br>
|
||
|
|
||
|
|
||
|
<h3>Required Parameter Group</h3>
|
||
|
|
||
|
<dl>
|
||
|
<dt><strong>Output data buffer</strong></dt>
|
||
|
|
||
|
<dd>OUTPUT; CHAR(*)
|
||
|
|
||
|
<p>The information retrieved from the associated space. This information
|
||
|
contains scalar data only. If information that was previously stored contained
|
||
|
pointer data, the pointer data was not preserved.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Length of output data buffer</strong></dt>
|
||
|
|
||
|
<dd>INPUT; BINARY(4)
|
||
|
|
||
|
<p>The length of the output data buffer, in bytes. If this value is larger than
|
||
|
the actual size of the output data buffer, the results may not be
|
||
|
predictable.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Qualified program name</strong></dt>
|
||
|
|
||
|
<dd>INPUT; CHAR(20)
|
||
|
|
||
|
<p>The program object for which you want to retrieve data from the associated
|
||
|
space. This must be an OPM, user-state program in the user domain. An error is
|
||
|
returned if the program is an Integrated Language Environment (ILE) program, or
|
||
|
if it is a system-state or system-domain program. The first 10 characters
|
||
|
contain the program name, and the second 10 characters contain the library
|
||
|
name.</p>
|
||
|
|
||
|
<p>You can use the following special value for the program name:</p>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="5 95" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em><strong>*</strong></em></td>
|
||
|
<td align="left" valign="top">Use a program in the call stack. The call stack
|
||
|
counter contains the number of programs up the stack from the calling program
|
||
|
to look for the program from which to retrieve data.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<p>You can use these special values for the library name:</p>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*CURLIB</em></td>
|
||
|
<td align="left" valign="top">The job's current library</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>*LIBL</em></td>
|
||
|
<td align="left" valign="top">The library list</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
|
||
|
<br>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Call stack counter</strong></dt>
|
||
|
|
||
|
<dd>INPUT; BINARY(4)
|
||
|
|
||
|
<p> A number greater than zero identifying the location in the call stack for
|
||
|
the program if * is specified for the program name. This number is relative to
|
||
|
the program that called this API. This parameter is ignored if the program name
|
||
|
is not *.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Data handle</strong></dt>
|
||
|
|
||
|
<dd>INPUT; CHAR(16)
|
||
|
|
||
|
<p>The identifier to retrieve the information from in the associated space.
|
||
|
Specify the data handle that was previously used on the Store Program
|
||
|
Associated Space (QCLSPGAS) API to store information in the associated space.
|
||
|
If no data was previously stored at this data handle, no error is returned. The
|
||
|
length of data available parameter will be set to 0 indicating no data was
|
||
|
available.</p>
|
||
|
</dd>
|
||
|
|
||
|
<dt><strong>Length of data available</strong></dt>
|
||
|
|
||
|
<dd>OUTPUT; BINARY(4)
|
||
|
|
||
|
<p>Either the length of the data actually returned or the length of data
|
||
|
available.</p>
|
||
|
|
||
|
<p>The possible values follow:</p>
|
||
|
|
||
|
<table cellpadding="5">
|
||
|
<!-- cols="15 85" -->
|
||
|
<tr>
|
||
|
<td align="left" valign="top"><em>0</em></td>
|
||
|
<td align="left" valign="top">No data was previously stored at the data handle
|
||
|
specified.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">From 1 to the value of the length of output data
|
||
|
buffer parameter</td>
|
||
|
<td align="left" valign="top">The length of information available and
|
||
|
successfully returned in the output data buffer.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">Greater than the value of the length of output
|
||
|
data buffer parameter</td>
|
||
|
<td align="left" valign="top">The total length of data available. If the output
|
||
|
data buffer is too small to hold all of the information available, the
|
||
|
information is truncated to fit the available space.</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>Error Messages</h3>
|
||
|
|
||
|
<table 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 width="15%" valign="top">CPF0301 E</td>
|
||
|
<td width="85%" valign="top">Length of data buffer is not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF0302 E</td>
|
||
|
<td align="left" valign="top">Value for call stack counter not valid.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF0304 E</td>
|
||
|
<td align="left" valign="top">Operation not allowed for program &1 in
|
||
|
library &2.</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">CPF3C90 E</td>
|
||
|
<td align="left" valign="top">Literal value cannot be changed.</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">CPF8100 E</td>
|
||
|
<td align="left" valign="top">All CPF81xx messages could be returned. xx is
|
||
|
from 01 to FF.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9803 E</td>
|
||
|
<td align="left" valign="top">Cannot allocate object &2 in library
|
||
|
&3.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9807 E</td>
|
||
|
<td align="left" valign="top">One or more libraries in library list
|
||
|
deleted.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9808 E</td>
|
||
|
<td align="left" valign="top">Cannot allocate one or more libraries on library
|
||
|
list.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9810 E</td>
|
||
|
<td align="left" valign="top">Library &1 not found.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9811 E</td>
|
||
|
<td align="left" valign="top">Program &1 in library &2 not found.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9820 E</td>
|
||
|
<td align="left" valign="top">Not authorized to use library &1.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9821 E</td>
|
||
|
<td align="left" valign="top">Not authorized to program &1 in library
|
||
|
&2.</td>
|
||
|
</tr>
|
||
|
|
||
|
<tr>
|
||
|
<td align="left" valign="top">CPF9830 E</td>
|
||
|
<td align="left" valign="top">Cannot assign library &1.</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>
|
||
|
|
||
|
<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=
|
||
|
"pgm1.htm">Program and CL Command APIs</a> | <a href="aplist.htm">APIs by
|
||
|
category</a></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</center>
|
||
|
</body>
|
||
|
</html>
|
||
|
|