CREATE LIBRARY
Create a LIBRARY resource in the local CICS® region.
Conditions: ILLOGIC, INVREQ, LENGERR, NOTAUTH
Description
The CREATE LIBRARY command installs a LIBRARY resource with the attributes specified on the command. It does not use a resource definition stored in the CSD.
When you use the CREATE LIBRARY command to create a LIBRARY resource, the LIBRARY name must not be the same as the name of any other public LIBRARY resource in the CICS region. If the local region already has a public LIBRARY resource with the name you specify, the new definition replaces the old one, providing the old LIBRARY is disabled, otherwise the command is rejected. A LIBRARY resource that was defined and installed in a CICS bundle cannot be replaced using this command.
When you define a LIBRARY resource in a CICS bundle that is packaged and installed as part of an application deployed on a platform, CICS creates a private LIBRARY resource for the application, so the resource name does not have to be unique in the CICS region. For more information about public resources and private resources, see Private resources for application versions.
Options
- ATTRIBUTES(data-value)
- Specifies the attributes of the LIBRARY resource being added. The list of attributes must be coded as a single character string using the syntax shown in LIBRARY attributes. See The ATTRIBUTES option for general rules for specifying attributes, and LIBRARY definition attributes for details about specific attributes.
- ATTRLEN(data-value)
- Specifies the length in bytes of the character string supplied in the ATTRIBUTES option, as a halfword binary value. The length can be from 0 to 32767.
- LIBRARY(data-value)
- Specifies the 8-character name of the LIBRARY resource to be added to the CICS region.
- LOGMESSAGE(cvda)
- Specifies whether CICS logs the attributes used for the resource that
is created. CVDA values are as follows:
- LOG
- The resource attributes are logged to the CSDL transient data queue.
- NOLOG
- The resource attributes are not logged.
Conditions
- ILLOGIC
- RESP2 values:
- 2
- The command cannot be executed because an earlier change which affects the LIBRARY search order has not yet completed.
- INVREQ
- RESP2 values:
- n
- There is a syntax error in the ATTRIBUTES string, or an error
occurred during either the discard or resource definition phase of
the processing. Most of the RESP2 values issued by the EXEC CICS CREATE command are associated
with a message that is written to transient data queue CSMT. The RESP2
values and the corresponding message numbers are shown in a table
in the RESP2 values for EXEC CICS CREATE and EXEC CICS CSD commands topic in
the CICS Information Center.Syntax errors can be caused by the following:
- An invalid LIBRARY name.
- A ranking value is out of the range 1-99.
- A ranking value is the reserved value of 10.
- No DSNAMExx attribute is specified (at least 1 data set name must be provided).
- The LIBRARY name provided is a reserved name
Errors during the discard or resource definition phase can be caused by the following:- Insufficient storage to create internal control structures for the LIBRARY
- Data set allocation failed
- Data set concatenation failed
- The LIBRARY failed to open
- An existing LIBRARY of the same name already exists and is not disabled
- Write to the CICS catalog failed
- 7
- The LOGMESSAGE CVDA value is not valid.
- 200
- The command was executed in a program defined with an EXECUTIONSET value of DPLSUBSET or a program was invoked from a remote system by a distributed program link without the SYNCONRETURN option.
- 500
- Install failed because an existing LIBRARY of the same name exists, and could not be replaced because it is not disabled.
- LENGERR
- RESP2 values:
- 1
- The length you have specified in ATTRLEN is negative.
- NOTAUTH
- RESP2 values:
- 100
- The user associated with the issuing task is not authorized to use this command.
- 103
- The CICS region does not have read access to one of the data sets that make up the LIBRARY concatenation.