278 lines
7.2 KiB
HTML
278 lines
7.2 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 Pointer to User Space (QUSPTRUS) 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. -->
|
|
<!-- QUSPTRUS SCRIPT J converted by B2H R4.1 (346) (CMS) by PMHALL at -->
|
|
<!-- RCHVMW2 on 7 Oct 1998 at 16:15:45 -->
|
|
<!-- Change History: -->
|
|
<!-- YYMMDD USERID Change description -->
|
|
<!-- Edited by Kersten Jan 02 -->
|
|
<!--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 Pointer to User Space (QUSPTRUS) 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%">Qualified user space name</td>
|
|
<td align="left" valign="top" width="20%">Input</td>
|
|
<td align="left" valign="top" width="20%">Char(20)</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td align="center" valign="top">2</td>
|
|
<td align="left" valign="top">Return pointer</td>
|
|
<td align="left" valign="top">Output</td>
|
|
<td align="left" valign="top">PTR(SPP)</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
Optional Parameter:<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
<table width="100%">
|
|
|
|
<tr>
|
|
<td align="center" valign="top" width="10%">3</td>
|
|
<td align="left" valign="top" width="50%">Error code</td>
|
|
<td align="left" valign="top" width="20%">I/O</td>
|
|
<td align="left" valign="top" width="20%">Char(*)</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
Default Public Authority: *USE<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
Threadsafe: Yes<br>
|
|
<!-- iddvc RMBR -->
|
|
<br>
|
|
</div>
|
|
|
|
<p>The Retrieve Pointer to User Space (QUSPTRUS) API retrieves a pointer to the
|
|
contents of a user-domain user space. The data in that user space then can be
|
|
directly manipulated by high-level language programs that support pointers,
|
|
such as C or COBOL. The QUSPTRUS API will not return a pointer to a
|
|
system-domain user space; you must use system APIs to access system-domain user
|
|
spaces. If you attempt to retrieve the pointer to a system-domain user space,
|
|
an error will be returned.</p>
|
|
|
|
<p>The QUSPTRUS API even returns a pointer to an object that is subject to an
|
|
exclusive (*EXCL) lock. If you create application programs using HLLs that can
|
|
directly update user spaces using pointers (instead of using the Change User
|
|
Space (QUSCHGUS) API), you should use your own synchronization data methods.
|
|
You can use one of the following methods to avoid updates at the same time to
|
|
the same location within a user space:</p>
|
|
|
|
<ul>
|
|
<li>CMPSW MI instruction</li>
|
|
|
|
<li>CMPSWP MI instruction</li>
|
|
|
|
<li>LOCK MI instruction</li>
|
|
|
|
<li>LOCKSL MI instruction</li>
|
|
|
|
<li>Allocate Object (ALCOBJ) command</li>
|
|
</ul>
|
|
|
|
<p>Use of the QUSPTRUS API does not update the object usage information (such
|
|
as last changed date, last date used, and so on). You should use the Change
|
|
User Space or the Retrieve User Space API to update the object usage
|
|
information if needed.</p>
|
|
|
|
<p>Examples of the API are in Examples: Defining queries, Example: Deleting old spooled files, and
|
|
Example: Using the user-defined communications programs for file transfer
|
|
in <a href="../apiref/apiexmp.htm">API examples</a>.</p>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Authorities and Locks</h3>
|
|
|
|
<dl compact>
|
|
<dt><em>Library Authority</em></dt>
|
|
|
|
<dd>*EXECUTE</dd>
|
|
|
|
<dt><em>User Space Authority</em></dt>
|
|
|
|
<dd>*USE</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Required Parameter Group</h3>
|
|
|
|
<dl>
|
|
<dt><strong>Qualified user space name</strong></dt>
|
|
|
|
<dd>INPUT; CHAR(20)
|
|
|
|
<p>The first 10 characters contain the user space name, and the second 10
|
|
characters contain the name of the library where the user space is located. The
|
|
special values supported for the library name are *LIBL and *CURLIB.</p>
|
|
</dd>
|
|
|
|
<dt><strong>Return pointer</strong></dt>
|
|
|
|
<dd>OUTPUT; PTR(SPP)
|
|
|
|
<p>The variable containing the pointer to the user space after the QUSPTRUS API
|
|
has completed running. This parameter must be on a 16-byte boundary
|
|
alignment.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<br>
|
|
|
|
|
|
<h3>Optional Parameter</h3>
|
|
|
|
<dl>
|
|
<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>. If this
|
|
parameter is omitted, diagnostic and escape messages are issued to the
|
|
application.</p>
|
|
</dd>
|
|
</dl>
|
|
|
|
<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 width="15%" valign="top">CPF24B4 E</td>
|
|
<td width="85%" valign="top">Severe error while addressing parameter list.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF3CF1 E</td>
|
|
<td valign="top">Error code parameter not valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF3C05 E</td>
|
|
<td valign="top">One or more errors found while trying to retrieve a
|
|
pointer.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF3C18 E</td>
|
|
<td valign="top">Pointer parameter is not on a 16-byte boundary.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPD3C18 D</td>
|
|
<td valign="top">Pointer parameter is not on a 16-byte boundary.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF3C36 E</td>
|
|
<td valign="top">Number of parameters, &1, entered for this API was not
|
|
valid.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF3C48 E</td>
|
|
<td valign="top">Operation not valid on system domain object.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF3C90 E</td>
|
|
<td valign="top">Literal value cannot be changed.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF8100 E</td>
|
|
<td valign="top">All CPF81xx messages could be returned. xx is from 01 to
|
|
FF.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9801 E</td>
|
|
<td valign="top">Object &2 in library &3 not found.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9802 E</td>
|
|
<td valign="top">Not authorized to object &2 in &3.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9803 E</td>
|
|
<td valign="top">Cannot allocate object &2 in library &3.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9810 E</td>
|
|
<td valign="top">Library &1 not found.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9820 E</td>
|
|
<td valign="top">Not authorized to use library &1.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9830 E</td>
|
|
<td valign="top">Cannot assign library &1.</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td valign="top">CPF9872 E</td>
|
|
<td valign="top">Program or service program &1 in library &2 ended.
|
|
Reason code &3.</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br>
|
|
<hr>
|
|
API introduced: V2R3
|
|
|
|
<hr>
|
|
<table cellpadding="2" cellspacing="2" align="center">
|
|
<tr align="center">
|
|
<td valign="middle" align="center"><a href="#Top_Of_Page">Top</a> | <a href=
|
|
"obj1.htm">Object API categories</a> | <a href="aplist.htm">API by
|
|
category</a></td>
|
|
</tr>
|
|
</table>
|
|
</body>
|
|
</html>
|
|
|