CREATE FILE
Define a file in the local CICS® region.
Syntax
Conditions: ILLOGIC, INVREQ, LENGERR, NOTAUTH
NOHANDLE, RESP, and
RESP2 are common options that can be added to all EXEC CICS
commands to process error conditions. They are not explicitly included in the command syntax diagram
and option descriptions. For information about these common options and EXEC CICS
command syntax, see EXEC CICS command format and programming considerations.
Description
The CREATE FILE command installs a FILE definition with the attribute specified on the command. It does not use a resource definition stored in the CSD. If there is already a file with the name you specify in the local CICS region, the new definition replaces the old one; if not, the new definition is added.
A sync point is implicit in CREATE FILE processing, except when an exception condition is detected early in processing the command. Uncommitted changes to recoverable resources made up to that point in the task are committed if the CREATE executes successfully, and rolled back if not. See Using EXEC CICS CREATE commands to define resources for other general rules governing CREATE commands.
The CREATE commands are not audited because their actions are recorded by other messages.
Options
- ATTRIBUTES(data-value)
- Specifies the attributes of the file that is added. The list of
attributes must be coded as a single character string using the syntax
shown. See The ATTRIBUTES option for
general rules for specifying attributes, and File attributes for
details about specific attributes. Note: You can assign default values for all attributes of a FILE definition by specifying an ATTRLEN value of 0. You still must specify the ATTRIBUTES option, however, even though its value is not used.
- 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.
- FILE(data-value)
- Specifies the 8-character name of the FILE definition 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 CONNECTION or TERMINAL pool definition has not yet been 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. See RESP2 values for CREATE and CSD commands for information about RESP2 values.
- 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 invoked from a remote system by a distributed program link without the SYNCONRETURN option.
- 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.
- 101
- The user associated with the issuing task is not authorized to create a FILE definition with this name.