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

754 lines
22 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>Create User Space (QUSCRTUS) 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. -->
<!-- QUSCRTUS SCRIPT A converted by B2H R4.1 (346) (CMS) by PMHALL at -->
<!-- RCHVMW2 on 7 Oct 1998 at 16:55:54 -->
<!-- Change History: -->
<!-- YYMMDD USERID Change description -->
<!-- 050727 hgomezv d3602.3 Updating confusing information. -->
<!-- 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>Create User Space (QUSCRTUS) API</h2>
<div class="box" style="width: 70%;">
<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%">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">Extended attribute</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(10)</td>
</tr>
<tr>
<td align="center" valign="top">3</td>
<td align="left" valign="top">Initial size</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">4</td>
<td align="left" valign="top">Initial value</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(1)</td>
</tr>
<tr>
<td align="center" valign="top">5</td>
<td align="left" valign="top">Public authority</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(10)</td>
</tr>
<tr>
<td align="center" valign="top">6</td>
<td align="left" valign="top">Text description</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(50)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Optional Parameter Group 1:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">7</td>
<td align="left" valign="top" width="50%">Replace</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Char(10)</td>
</tr>
<tr>
<td align="center" valign="top">8</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;Optional Parameter Group 2:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">9</td>
<td align="left" valign="top" width="50%">Domain</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Char(10)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Optional Parameter Group 3:<br>
<!-- iddvc RMBR -->
<br>
<table width="100%">
<tr>
<td align="center" valign="top" width="10%">10</td>
<td align="left" valign="top" width="50%">Transfer size request</td>
<td align="left" valign="top" width="20%">Input</td>
<td align="left" valign="top" width="20%">Binary(4)</td>
</tr>
<tr>
<td align="center" valign="top">11</td>
<td align="left" valign="top">Optimum space alignment</td>
<td align="left" valign="top">Input</td>
<td align="left" valign="top">Char(1)</td>
</tr>
</table>
<br>
&nbsp;&nbsp;Default Public Authority: *USE<br>
<!-- iddvc RMBR -->
<br>
&nbsp;&nbsp;Threadsafe: Yes<br>
<!-- iddvc RMBR -->
<br>
</div>
<p>The Create User Space (QUSCRTUS) API creates a user space in either the user
domain or the system domain. A system-domain user space cannot be saved to a
release prior to Version 2 Release 3 Modification 0. A user-domain user space
can be directly manipulated with machine interface (MI) instructions or can be
accessed using system APIs. On systems with a QSECURITY system value of 40 or
greater, applications can only access system-domain user spaces using APIs. The
user space objects you create are larger than or equal to the size specified.
They have a fixed length and can be extended or truncated using the Change User
Space Attributes (QUSCUSAT) API or the Modify Space (MODS) MI instruction (for
user-domain user spaces). (The MODS instruction will not work on system-domain
user spaces if the security level of the system is 40 or greater.)</p>
<p><img src="delta.gif" alt="Start of change"> <strong>Note:</strong> For performance reasons, the *USRSPC object is
created before checking to see if it exists in the library specified for the
qualified user space name. If you have an application using this API
repeatedly, even if you are using *NO for the replace parameter, permanent
system addresses will be used. <img src="deltaend.gif" alt="End of change"> </p>
<br>
<h3>Authorities and Locks</h3>
<dl>
<dt><em>User Space Authority</em></dt>
<dd>*OBJMGT, *OBJEXIST, and *READ. These authorities are required only if the
replace parameter is used and if there is an existing user space to
replace.</dd>
<dt><em>User Space Library Authority</em></dt>
<dd>*READ and *ADD.</dd>
<dt><em>User Space Lock</em></dt>
<dd>*EXCL. This applies to both the user space being created and an existing
user space being replaced.</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
only special value supported for the library name is *CURLIB.</p>
<p>User spaces created in the QTEMP and QRPLOBJ libraries are not forced to
permanent storage; they are deleted when those libraries are cleared at
sign-off and system IPL, respectively.</p>
</dd>
<dt><strong>Extended attribute</strong></dt>
<dd>INPUT; CHAR(10)
<p><img src="delta.gif" alt="Start of change"> The extended attribute of the user space. For example, an object type of
*FILE has an extended attribute of PF (physical file), LF (logical file), DSPF
(display file), SAVF (save file), and so on. A *USRSPC might have user defined extended attributes such as LOG, TRACE, and CONTROL. <img src="deltaend.gif" alt="End of change">
</p>
<p>The extended attribute must be a valid *NAME. You can enter this parameter
in uppercase, lowercase, or mixed case. The API converts it to uppercase.</p>
</dd>
<dt><strong>Initial size</strong></dt>
<dd>INPUT; BINARY(4)
<p>The initial size of the user space being created. This value must be from 1
byte to 16, 776, 704 bytes.</p>
</dd>
<dt><strong>Initial value</strong></dt>
<dd>INPUT; CHAR(1)
<p>The initial value of all bytes in the user space. You will achieve the best
performance if you set this byte to X'00'.</p>
</dd>
<dt><strong>Public authority</strong></dt>
<dd>INPUT; CHAR(10)
<p>The authority you give users who do not have specific private or group
authority to the user space. Once the user space has been created, its public
authority stays the same when it is moved to another library or restored from
backup media.</p>
<p>If the replace parameter is used and a user space exists to be replaced,
this parameter is ignored. All authorities are transferred from the replaced
user space to the new one.</p>
<p>The valid values for this parameter are:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>*ALL</em></td>
<td align="left" valign="top">The user can perform all authorized operations on
the object.</td>
</tr>
<tr>
<td align="left" valign="top"><em>Authorization list name</em></td>
<td align="left" valign="top">The user space is secured by the specified
authorization list, and its public authority is set to *AUTL. The specified
authorization list must exist on the system when this API is called. If it does
not exist, the create process fails, and an error is returned to the
application.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*CHANGE</em></td>
<td align="left" valign="top">The user can read the object description and has
read, add, update, and delete authority to the object.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*EXCLUDE</em></td>
<td align="left" valign="top">The user cannot access the object in any
way.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*LIBCRTAUT</em></td>
<td align="left" valign="top">The public authority for the user space is taken
from the CRTAUT value for the target library when the object is created. If the
CRTAUT value for the library changes later, that change does not affect user
spaces already created. If the CRTAUT value contains an authorization list name
and that authorization list secures an object, do not delete the list. If you
do, the next time you call this API with the *LIBCRTAUT parameter, it will
fail.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*USE</em></td>
<td align="left" valign="top">The user can read the object and its description
but cannot change them.</td>
</tr>
</table>
<br>
</dd>
<dt><strong>Text description</strong></dt>
<dd>INPUT; CHAR(50)
<p>This text briefly describes the user space.</p>
</dd>
</dl>
<br>
<h3>Optional Parameter Group 1</h3>
<dl>
<dt><strong>Replace</strong></dt>
<dd>INPUT; CHAR(10)
<p>Whether you want to replace an existing user space.</p>
<p>Valid values for this parameter are:</p>
<table cellpadding="5">
<!-- cols="10 90" -->
<tr>
<td align="left" valign="top"><em>*NO</em></td>
<td align="left" valign="top">Do not replace an existing user space of the same
name and library. *NO is the default value.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*YES</em></td>
<td align="left" valign="top">Replace an existing user space of the same name
and library.</td>
</tr>
<tr>
<td align="left" valign="top"></td>
<td align="left" valign="top">If the user space already exists, it is replaced
by a new user space of the same name and library, and is subject to the same
authorities. The user space being replaced is destroyed if both:
<ul>
<li>The allow user domain (QALWUSRDMN) system value is not set to *ALL or does
not contain the library QRPLOBJ.</li>
<li>The user space you are replacing is in the user domain.</li>
</ul>
</td>
</tr>
</table>
<br>
<p>If the user space is in the system domain, it is moved to QRPLOBJ. If
QALWUSRDMN is set to *ALL or if it contains QRPLOBJ, the replaced user space is
moved to QRPLOBJ, which is cleared at system IPL. For details about
authorities, ownership, and renaming, see the discussion of the REPLACE
parameter in the <a href="../rbam6/rbam6clmain.htm">Control Language (CL)</a>
information in the iSeries Information Center.</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>. If this
parameter is omitted, diagnostic and escape messages are issued to the
application.</p>
</dd>
</dl>
<br>
<h3>Optional Parameter Group 2</h3>
<dl>
<dt><strong>Domain</strong></dt>
<dd>INPUT; CHAR(10)
<p>The domain into which the user space is created. If this parameter is not
specified, the value of *DEFAULT is assumed by the API.</p>
<p>Valid values for this parameter are:</p>
<table cellpadding="5">
<!-- cols="15 85" -->
<tr>
<td align="left" valign="top"><em>*DEFAULT</em></td>
<td align="left" valign="top">Allows the system to decide into which domain the
object should be created.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*SYSTEM</em></td>
<td align="left" valign="top">Creates the user space object into the system
domain. The API can always create a user space into the system domain
regardless of the security level in effect. However, you must use APIs to
access system-domain user spaces if you are running at security level 40 or
greater.</td>
</tr>
<tr>
<td align="left" valign="top"><em>*USER</em></td>
<td align="left" valign="top">Attempts to create the user space object into the
user domain. This is not always possible. If the library you are creating the
user space into does not appear in the QALWUSRDMN system value, the API cannot
create the user space into the user domain. An error will be returned.</td>
</tr>
</table>
<br>
</dd>
</dl>
<p>The API uses the following values to determine into which domain to create
the user space. The destination library is the library you specified in the
qualified user space name parameter. The optional domain parameter is the
information specified in the domain parameter.</p>
<table border width="80%">
<tr>
<th align="left" valign="bottom">QALWUSRDMN System Value</th>
<th align="left" valign="bottom">Destination Library</th>
<th align="left" valign="bottom">Optional Domain Parameter</th>
<th align="left" valign="bottom">Domain of Created Object</th>
</tr>
<tr>
<td align="left" valign="bottom">*ALL</td>
<td align="left" valign="bottom">Any</td>
<td align="left" valign="bottom">*DEFAULT</td>
<td align="left" valign="bottom">User domain</td>
</tr>
<tr>
<td align="left" valign="bottom">*ALL</td>
<td align="left" valign="bottom">Any</td>
<td align="left" valign="bottom">*SYSTEM</td>
<td align="left" valign="bottom">System domain</td>
</tr>
<tr>
<td align="left" valign="bottom">*ALL</td>
<td align="left" valign="bottom">Any</td>
<td align="left" valign="bottom">*USER</td>
<td align="left" valign="bottom">User domain</td>
</tr>
<tr>
<td align="left" valign="bottom">QTEMP</td>
<td align="left" valign="bottom">QTEMP</td>
<td align="left" valign="bottom">*DEFAULT</td>
<td align="left" valign="bottom">User domain</td>
</tr>
<tr>
<td align="left" valign="bottom">QTEMP</td>
<td align="left" valign="bottom">QTEMP</td>
<td align="left" valign="bottom">*SYSTEM</td>
<td align="left" valign="bottom">System domain</td>
</tr>
<tr>
<td align="left" valign="bottom">QTEMP</td>
<td align="left" valign="bottom">QTEMP</td>
<td align="left" valign="bottom">*USER</td>
<td align="left" valign="bottom">User domain</td>
</tr>
<tr>
<td align="left" valign="bottom">Does not contain library name</td>
<td align="left" valign="bottom">Library name</td>
<td align="left" valign="bottom">*DEFAULT</td>
<td align="left" valign="bottom">System domain</td>
</tr>
<tr>
<td align="left" valign="bottom">Does not contain library name</td>
<td align="left" valign="bottom">Library name</td>
<td align="left" valign="bottom">*SYSTEM</td>
<td align="left" valign="bottom">System domain</td>
</tr>
<tr>
<td align="left" valign="bottom">Does not contain library name</td>
<td align="left" valign="bottom">Library name</td>
<td align="left" valign="bottom">*USER</td>
<td align="left" valign="bottom">None; error is returned</td>
</tr>
<tr>
<td align="left" valign="top" colspan="4"><strong>Note:</strong> The QALWUSRDMN
system value lists the libraries into which user domain objects can be created.
The libraries can be the special value *ALL or a list of one or more library
names.</td>
</tr>
</table>
<br>
<p>You must use APIs to access data or information in system-domain user spaces
on systems with a QSECURITY level of 40 or greater. You cannot use MI
instructions to directly access system-domain user objects.</p>
<p>The Retrieve Object Description (QUSROBJD) or List Objects (QUSLOBJ) API can
be used to determine into which domain the user-space object was created.</p>
<br>
<h3>Optional Parameter Group 3</h3>
<dl>
<dt><strong>Transfer size request</strong></dt>
<dd>INPUT; BINARY(4)
<p>The number of pages to be transferred between main storage and auxiliary
storage This is only a request, as the machine may use a value of its choice in
some circumstances. Allowable values range between 0 and 32 pages. A value of 0
is an indication that the machine should use the default transfer size for the
user space. If this parameter is not specified, the default is 0. A larger
transfer size may allow for better performance of applications processing the
user space.</p>
</dd>
<dt><strong>Optimum space alignment</strong></dt>
<dd>INPUT; CHAR(1)
<p><img src="delta.gif" alt="Start of change">Allows the machine to choose optimum alignment for the user space. Choosing optimum alignment is highly recommended. Applications that manipulate optimally aligned user spaces may perform significantly better.<img src="deltaend.gif" alt="End of change"></p>
</dd>
</dl>
<p>Allowable values are:</p>
<table cellpadding="5">
<!-- cols="5 95" -->
<tr>
<td align="left" valign="top"><img src="delta.gif" alt="Start of change"><em>0</em></td>
<td align="left" valign="top">Do not allow the machine to choose optimum space alignment. 0 is the
default value.<img src="deltaend.gif" alt="End of change"></td>
</tr>
<tr>
<td align="left" valign="top"><em>1</em></td>
<td align="left" valign="top">Choose optimum space alignment.</td>
</tr>
</table>
<br>
<p><strong>Note:</strong> If not using the optimum space alignment, the user
space has a maximum size of 16MB minus 512 bytes (16,776,704 bytes). If optimum
alignment is specified, the maximum size of the user space is 16MB minus one
disk page (current page size is 4096 bytes, giving a maximum space size of
16,773,120 bytes).</p>
<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">CPF2143 E</td>
<td width="85%" valign="top">Cannot allocate object &amp;1 in &amp;2 type
*&amp;3.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2144 E</td>
<td align="left" valign="top">Not authorized to &amp;1 in &amp;2 type
*&amp;3.</td>
</tr>
<tr>
<td align="left" valign="top">CPF2283 E</td>
<td align="left" valign="top">Authorization list &amp;1 does not exist.</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">CPF3C01 E</td>
<td align="left" valign="top">User space &amp;2 in library &amp;1 not
created.</td>
</tr>
<tr>
<td align="left" valign="top">CPD3C01 D</td>
<td align="left" valign="top">Object name &amp;1 is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPD3C03 D</td>
<td align="left" valign="top">Extended attribute &amp;1 is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPD3C04 D</td>
<td align="left" valign="top">Value &amp;1 for size parameter is not
valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPD3C05 D</td>
<td align="left" valign="top">Value &amp;1 for authority parameter is not
valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C2B E</td>
<td align="left" valign="top">Extended attribute &amp;1 is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C2C E</td>
<td align="left" valign="top">Value &amp;1 for size parameter is not
valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C2D E</td>
<td align="left" valign="top">Value &amp;1 for authority parameter is not
valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C29 E</td>
<td align="left" valign="top">Object name &amp;1 is not valid.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C34 E</td>
<td align="left" valign="top">Value &amp;1 for replace option 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">CPF3C45 E</td>
<td align="left" valign="top">Value &amp;1 not valid for domain parameter.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C49 E</td>
<td align="left" valign="top">Request for user domain object cannot be
granted.</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">CPF3C91 E</td>
<td align="left" valign="top">Value &amp;1 not valid for transfer size request
parameter.</td>
</tr>
<tr>
<td align="left" valign="top">CPF3C92</td>
<td align="left" valign="top">Value &amp;1 not valid for optimum space
alignment parameter.</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">CPF9810 E</td>
<td align="left" valign="top">Library &amp;1 not found.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9820 E</td>
<td align="left" valign="top">Not authorized to use library &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9830 E</td>
<td align="left" valign="top">Cannot assign library &amp;1.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9838 E</td>
<td align="left" valign="top">User profile storage limit exceeded.</td>
</tr>
<tr>
<td align="left" valign="top">CPF9870 E</td>
<td align="left" valign="top">Object &amp;2 type *&amp;5 already exists in
library &amp;3.</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: V1R3
<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>