ibm-information-center/dist/eclipse/plugins/i5OS.ic.cl_5.4.0.1/crtlib.htm

394 lines
18 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">
<title>Create Library (CRTLIB)</title>
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
</head>
<body bgcolor="white">
<script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
<a name="CRTLIB.Top_Of_Page"></a>
<h2>Create Library (CRTLIB)</h2>
<table width="100%">
<tr>
<td valign="top" align="left"><b>Where allowed to run: </b>All environments (*ALL)<br>
<b>Threadsafe: </b>Yes
</td>
<td valign="top" align="right">
<a href="#CRTLIB.PARAMETERS.TABLE">Parameters</a><br>
<a href="#CRTLIB.COMMAND.EXAMPLES">Examples</a><br>
<a href="#CRTLIB.ERROR.MESSAGES">Error messages</a></td>
</tr>
</table>
<div> <a name="CRTLIB"></a>
<p>The Create Library (CRTLIB) command adds a new library to the system. Before any objects are placed into a library, the library must have been created. When the library is created, it appears as though it exists in the QSYS (system) library.
</p>
<p><b>Restrictions:</b>
</p>
<ol>
<li>A library with the name QRCL or QRPLOBJ can only be created in the system ASP (ASP 1).
</li>
<li>A library with the name QRCLxxxxx or QRPLxxxxx can only be created in the ASP for which the ASP number corresponds to 'xxxxx' (where 'xxxxx' is the number of a primary ASP right adjusted and padded on the left with zeros); for example, library QRPL00033 can only be created in the ASP device corresponding to ASP number 33.
</li>
<li>When library QSPLnnnn is created in a primary or secondary ASP, it must be created in the ASP for which the ASP number corresponds to 'nnnn' (where 'nnnn' is the number of a primary or secondary ASP right adjusted and padded on the left with zeros).
</li>
<li>You cannot create a library with the name QSYSxxxxx, QSYS2xxxxx, or SYSIBxxxxx (where 'xxxxx' is a number).
</li>
</ol>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div>
<h3><a name="CRTLIB.PARAMETERS.TABLE">Parameters</a></h3>
<table border="1" cellpadding="4" cellspacing="0">
<!-- col1="10" col2="15" col3="30" col4="10" -->
<tr>
<th bgcolor="aqua" valign="bottom" align="left">Keyword</th>
<th bgcolor="aqua" valign="bottom" align="left">Description</th>
<th bgcolor="aqua" valign="bottom" align="left">Choices</th>
<th bgcolor="aqua" valign="bottom" align="left">Notes</th>
</tr>
<tr>
<td valign="top"><a href="#CRTLIB.LIB"><b>LIB</b></a></td>
<td valign="top">Library</td>
<td valign="top"><i>Name</i></td>
<td valign="top">Required, Positional 1</td>
</tr>
<tr>
<td valign="top"><a href="#CRTLIB.TYPE"><b>TYPE</b></a></td>
<td valign="top">Library type</td>
<td valign="top"><b><u>*PROD</u></b>, *TEST</td>
<td valign="top">Optional, Positional 2</td>
</tr>
<tr>
<td valign="top"><a href="#CRTLIB.TEXT"><b>TEXT</b></a></td>
<td valign="top">Text 'description'</td>
<td valign="top"><i>Character value</i>, <b><u>*BLANK</u></b></td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTLIB.AUT"><b>AUT</b></a></td>
<td valign="top">Authority</td>
<td valign="top"><i>Name</i>, <b><u>*LIBCRTAUT</u></b>, *CHANGE, *ALL, *USE, *EXCLUDE</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTLIB.ASP"><b>ASP</b></a></td>
<td valign="top">ASP number</td>
<td valign="top">1-32, <b><u>1</u></b>, *ASPDEV</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTLIB.ASPDEV"><b>ASPDEV</b></a></td>
<td valign="top">ASP device</td>
<td valign="top"><i>Name</i>, <b><u>*ASP</u></b>, *ASPGRPPRI, *SYSTEM</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTLIB.CRTAUT"><b>CRTAUT</b></a></td>
<td valign="top">Create authority</td>
<td valign="top"><i>Name</i>, <b><u>*SYSVAL</u></b>, *CHANGE, *ALL, *USE, *EXCLUDE</td>
<td valign="top">Optional</td>
</tr>
<tr>
<td valign="top"><a href="#CRTLIB.CRTOBJAUD"><b>CRTOBJAUD</b></a></td>
<td valign="top">Create object auditing</td>
<td valign="top"><b><u>*SYSVAL</u></b>, *NONE, *USRPRF, *CHANGE, *ALL</td>
<td valign="top">Optional</td>
</tr>
</table>
<table width="100%">
<tr><td align="right"><a href="#CRTLIB.Top_Of_Page">Top</a></td></tr>
</table>
</div>
<div> <a name="CRTLIB.LIB"></a>
<h3>Library (LIB)</h3>
<p>Specifies the library to be created.
</p>
<p>
<b>Note: </b>You should not use a name that begins with the character Q. The system assumes that libraries with those names are system libraries.
</p>
<p>This is a required parameter.
</p>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the library to be created.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTLIB.TYPE"></a>
<h3>Library type (TYPE)</h3>
<p>Specifies the type of library to be created.
</p>
<dl>
<dt><b><u>*PROD</u></b></dt>
<dd>This is a production library. Database files in production libraries cannot be opened for updating if a user is in debug mode and he requested that production libraries be protected. A user can protect all database files in production libraries from updates by specifying *NO for the <b>Update production files (UPDPROD)</b> parameter on the Start Debug (STRDBG) command to begin testing. However, this protection does not prevent the program from deleting database files or from changing other objects (such as data areas) in the library.
</dd>
<dt><b>*TEST</b></dt>
<dd>This is a test library. All objects in a test library can be updated during testing, even if special protection is requested for production libraries.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTLIB.TEXT"></a>
<h3>Text 'description' (TEXT)</h3>
<p>Specifies the text that briefly describes the library.
</p>
<dl>
<dt><b><u>*BLANK</u></b></dt>
<dd>The text is set to blanks.
</dd>
<dt><b><i>'description'</i></b></dt>
<dd>Specify no more than 50 characters of text, enclosed in apostrophes.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTLIB.AUT"></a>
<h3>Authority (AUT)</h3>
<p>Specifies the default public authority for this library. This is the authority you are giving to a user who does not have specific authority for the library, who is not on an authorization list specified for the library, and whose group profiles have no specific authority for the library.
</p>
<dl>
<dt><b><u>*LIBCRTAUT</u></b></dt>
<dd>The authority for the library is the same as the create authority for the QSYS library. The create authority for the QSYS library can be displayed by using the Display Library Description (DSPLIBD) command. If the create authority for QSYS is changed with the Change Library (CHGLIB) command, the new authority will not affect existing libraries.
</dd>
<dt><b>*CHANGE</b></dt>
<dd>Change (*CHANGE) authority provides the authority needed to perform all operations on the library except those limited to the owner or controlled by object existence (*OBJEXIST) and object management (*OBJMGT) authorities. The user can change and perform basic functions on the library. Change (*CHANGE) authority provides object operational (*OBJOPR) authority and all data authority.
</dd>
<dt><b>*ALL</b></dt>
<dd>All (*ALL) authority provides the authority needed to perform all operations except those limited to the owner or controlled by authorization list management (*AUTLMGT) authority. The user can control the library's existence, specify the security for the library, change the library, and perform basic functions on the library. The user also can change ownership of the library.
</dd>
<dt><b>*USE</b></dt>
<dd>Use (*USE) authority provides the authority needed to perform basic operations on the library, such as running a program or reading a file. The user cannot change the library. Use (*USE) authority provides object operational (*OBJOPR), read (*READ), and execute (*EXECUTE) authorities.
</dd>
<dt><b>*EXCLUDE</b></dt>
<dd>The user cannot access the library.
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of an authorization list. Users included on the authorization list are granted authority for the library as specified by the list. The authorization list must exist when the library is created.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTLIB.ASP"></a>
<h3>ASP number (ASP)</h3>
<p>Specifies the number of the system or basic user auxiliary storage pool (ASP) where storage for the library is allocated. For libraries created in an ASP, all objects in the library must be in the same ASP as the library. When a value other than *ASP is specified for the <b>ASP device (ASPDEV)</b> parameter, *ASPDEV is the only valid value that can be specified for the <b>ASP number (ASP)</b> parameter, if specified. Also when a value other than *ASP is specified for the ASPDEV parameter, the ASP parameter can be omitted and its defaulted value will be ignored.
</p>
<dl>
<dt><b><u>1</u></b></dt>
<dd>The storage space for the library is allocated from the system auxiliary storage pool ASP 1.
</dd>
<dt><b>*ASPDEV</b></dt>
<dd>The storage for the library is allocated from the primary or secondary ASP specified for the ASPDEV parameter.
</dd>
<dt><b><i>number</i></b></dt>
<dd>Specify a value ranging from 1 through 32 that is the number of the system or basic user ASP.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTLIB.ASPDEV"></a>
<h3>ASP device (ASPDEV)</h3>
<p>Specifies the auxiliary storage pool (ASP) device name where storage is allocated for the library. When a value other than *ASPDEV is specified for the <b>ASP number (ASP)</b> parameter, ASPDEV(*ASP) is the only valid value for the <b>ASP device (ASPDEV)</b> parameter, if specified. Other values for the ASPDEV parameter are valid if the ASP parameter is omitted. In this case, the defaulted value for the ASP parameter is ignored.
</p>
<dl>
<dt><b><u>*ASP</u></b></dt>
<dd>The storage for the library is allocated from the system or basic user ASP specified for the ASP parameter.
</dd>
<dt><b>*ASPGRPPRI</b></dt>
<dd>The storage for the library is allocated from the primary ASP of the thread's ASP group. If no ASP group is associated with the thread an error message is sent.
</dd>
<dt><b>*SYSTEM</b></dt>
<dd>The storage for the library is allocated from the system ASP (ASP 1).
</dd>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of a primary or secondary ASP device. The storage for the library is allocated from the primary or secondary ASP. The primary or secondary ASP must have been activated (by varying on the ASP device) and have a status of 'Available'.
<p>
<b>Note: </b>To specify a specific auxiliary storage pool (ASP) device name, you must have use (*USE) authority for each ASP device in the ASP group.
</p>
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTLIB.CRTAUT"></a>
<h3>Create authority (CRTAUT)</h3>
<p>Specifies the default public authority for an object created into this library. This is the authority given to a user who does not have specific authority for the object, who is not on an authorization list specified for the object, and whose user groups have no specific authority for the object.
</p>
<p>When the user creates an object into this library, the <b>Authority (AUT)</b> parameter on the create command for the object determines the public authority for the object. If the AUT value on the create command for the object is *LIBCRTAUT, the public authority for the object is set to the CRTAUT value for the library.
</p>
<dl>
<dt><b><u>*SYSVAL</u></b></dt>
<dd>The default public authority will be determined by the value of the QCRTAUT system value when an object is created into this library.
</dd>
</dl>
<dl>
<dt><b>*CHANGE</b></dt>
<dd>The user can perform all operations on the object except those limited to the owner or controlled by object existence (*OBJEXIST) and object management (*OBJMGT) authorities. The user can change and perform basic functions on the object. *CHANGE authority provides object operational (*OBJOPR) authority and all data authority. If the object is an authorization list, the user cannot add, change, or remove users.
</dd>
</dl>
<dl>
<dt><b>*ALL</b></dt>
<dd>The user can perform all operations except those limited to the owner or controlled by authorization list management (*AUTLMGT) authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user also can change ownership of the object.
</dd>
</dl>
<dl>
<dt><b>*USE</b></dt>
<dd>The user can perform basic operations on the object, such as running a program or reading a file. The user cannot change the object. Use (*USE) authority provides object operational (*OBJOPR), read (*READ), and execute (*EXECUTE) authorities.
</dd>
</dl>
<dl>
<dt><b>*EXCLUDE</b></dt>
<dd>The user cannot access the object.
</dd>
</dl>
<dl>
<dt><b><i>name</i></b></dt>
<dd>Specify the name of the authorization list whose authority is used for the object.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<div> <a name="CRTLIB.CRTOBJAUD"></a>
<h3>Create object auditing (CRTOBJAUD)</h3>
<p>Specifies the auditing value for objects created in this library.
</p>
<p>
<b>Note: </b>To specify a value other than *SYSVAL for this parameter, you must have audit (*AUDIT) special authority.
</p>
<dl>
<dt><b><u>*SYSVAL</u></b></dt>
<dd>The auditing value will be determined by the value of the QCRTOBJAUD system value when an object is created into this library.
</dd>
<dt><b>*NONE</b></dt>
<dd>Using or changing this object will not cause an audit entry to be sent to the security journal.
</dd>
<dt><b>*USRPRF</b></dt>
<dd>The user profile of the user accessing this object is used to determine if an audit entry will be sent to the security journal for the access. The <b>Object auditing value (OBJAUD)</b> parameter on the Change User Auditing (CHGUSRAUD) command is used to turn auditing on for a specific user.
</dd>
<dt><b>*CHANGE</b></dt>
<dd>All change access to this object by all users will cause an audit entry to be sent to the security journal.
</dd>
<dt><b>*ALL</b></dt>
<dd>All change or read access to this object by all users will cause an audit entry to be sent to the security journal.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CRTLIB.COMMAND.EXAMPLES">Examples</a> </h3>
<p><b>Example 1: Creating a Production Library</b>
</p>
<p>
<pre>
CRTLIB LIB(MYLIB) TEXT('My Production Library')
</pre>
</p>
<p>The library MYLIB is added to the system. The library is a production library; only the owner has object existence (*OBJEXIST) and object (*OBJMGT) management authorities for it. The authority for other users for library MYLIB is determined by the create authority of library QSYS, since *LIBCRTAUT was assumed for the AUT parameter. The text, 'My Production Library', is displayed whenever the library description for MYLIB is displayed.
</p>
<p><b>Example 2: Creating a Test Library</b>
</p>
<p>
<pre>
CRTLIB LIB(Z) TYPE(*TEST) AUT(*EXCLUDE)
TEXT('This is a test library')
</pre>
</p>
<p>Test library Z is added to the system. Only the owner of Z can use it because no other users have been granted any authority. The specified text ('This is a test library') is displayed whenever the library description for Z is displayed.
</p>
<p><b>Example 3: Creating a Library in an Independent Auxiliary Storage Pool (ASP)</b>
</p>
<p>
<pre>
CRTLIB LIB(INVENTORY) ASPDEV(SALES)
TEXT('Inventory Library on SALES ASP')
</pre>
</p>
<p>The library INVENTORY is added to the system in an independent auxiliary storage pool (ASP) named SALES. The SALES ASP must have been activated (by varying on the ASP device) and have a status of 'Available'. The library is a production library; only the owner has object existence (*OBJEXIST) and object management (*OBJMGT) authorities for it. The authority for other users to library INVENTORY is determined by the create authority of library QSYS, since *LIBCRTAUT was assumed for the AUT parameter. The text, 'Inventory Library on SALES ASP', is displayed whenever the library description for INVENTORY is displayed.
</p>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTLIB.Top_Of_Page">Top</a></td></tr>
</table>
<hr size="2" width="100%">
<div><h3><a name="CRTLIB.ERROR.MESSAGES">Error messages</a> </h3>
<p><b><u>*ESCAPE Messages</u></b>
</p>
<dl>
<dt><b>CPFB8ED</b></dt>
<dd>Device description &amp;1 not correct for operation.
</dd>
<dt><b>CPF21A0</b></dt>
<dd>*AUDIT required to create or change libraries.
</dd>
<dt><b>CPF210E</b></dt>
<dd>Library &amp;1 not available.
</dd>
<dt><b>CPF2111</b></dt>
<dd>Library &amp;1 already exists.
</dd>
<dt><b>CPF2122</b></dt>
<dd>Storage limit exceeded for user profile &amp;1.
</dd>
<dt><b>CPF2138</b></dt>
<dd>Creation of library &amp;3 not allowed.
</dd>
<dt><b>CPF2166</b></dt>
<dd>Library name &amp;1 not valid.
</dd>
<dt><b>CPF2172</b></dt>
<dd>ASPDEV value not valid with value specified for ASP.
</dd>
<dt><b>CPF218A</b></dt>
<dd>Library &amp;1 cannot be created into ASP &amp;2.
</dd>
<dt><b>CPF218B</b></dt>
<dd>Library &amp;1 cannot be created into ASPDEV &amp;2.
</dd>
<dt><b>CPF2197</b></dt>
<dd>Library &amp;1 cannot be created into user ASP &amp;2.
</dd>
<dt><b>CPF2283</b></dt>
<dd>Authorization list &amp;1 does not exist.
</dd>
<dt><b>CPF7012</b></dt>
<dd>Auxiliary storage pool &amp;4 not found for object &amp;1.
</dd>
<dt><b>CPF9814</b></dt>
<dd>Device &amp;1 not found.
</dd>
<dt><b>CPF9825</b></dt>
<dd>Not authorized to device &amp;1.
</dd>
<dt><b>CPF9833</b></dt>
<dd>*CURASPGRP or *ASPGRPPRI specified and thread has no ASP group.
</dd>
</dl>
</div>
<table width="100%">
<tr><td align="right"><a href="#CRTLIB.Top_Of_Page">Top</a></td></tr>
</table>
</body>
</html>