CEMT SET FILE

Change some attributes of one or more VSAM or BDAM files.

In the CICS Explorer, the Files operations view provides a functional equivalent to this command.

Description

Start of changeUse the CEMT transaction to modify files that are defined in the CICS® system definition (CSD) file and installed in the running CICS system.End of change

Start of changeTo modify the attributes of a FILE resource that was defined and installed in a CICS bundle, use the resource editor in the CICS Explorer® to modify the definition in the CICS bundle, and install a new version of the CICS bundle or of the application with which it was deployed. To update the definition, replace the old version of the CICS bundle with the new one, following the instructions in Working with bundles in the CICS Explorer product documentation.
  • CICS bundles that were deployed on their own or with a platform can be updated individually.
  • If the CICS bundle was deployed as part of an application or with an application binding, update the whole application.
You can use the SET FILE command to change the attributes of the dynamically generated resource, but these changes are not cataloged and are not recovered across a warm restart of CICS.End of change

Start of changeTo change the status of a FILE resource that was defined and installed in a CICS bundle, change the status of the CICS bundle or the application with which it is deployed. When you perform the disable action on a CICS bundle that defines a FILE resource, the action completes when the file is no longer in use and any retained locks have been resolved.End of change

Start of changeIf you are experiencing a problem with disabling a CICS bundle that defines a FILE resource, you may issue the CEMT SET FILE command with the FORCECLOSE option against the dynamically generated resource, if this action is required. Follow the troubleshooting procedure in Diagnosing application errors to diagnose the problem and take suitable action. End of change

Syntax

Press the Clear key to clear the screen. You can start this transaction in two ways:
  • Type CEMT SET FILE (or suitable abbreviations for the keywords), followed by a value that corresponds to a file name, or ALL. The resulting display lists the current status, similar to that obtained by CEMT INQUIRE FILE. You can tab to the highlighted or blank fields and overtype them with the required values.
  • Type CEMT SET FILE (or suitable abbreviations for the keywords), followed by a value that corresponds to a file name or ALL, then followed by one or more attribute settings that you want to change. For example, cemt s fi al op en attempts to set all files open and enabled for use.

Typing ? at the beginning of either the first or second line gives a syntax prompt. Reset values take effect immediately.

Note: Any combination of the options can be set on one command. For all changes, other than to close and disable the file, the file must be in a CLOSED state, with an ENABLESTATUS of either DISABLED or UNENABLED. Changes do not take effect until the file is next opened. If SET FILE CLOSED is used and the file is not closed immediately, then other attributes that require the file to be in a CLOSED state, and either DISABLED or UNENABLED, will be ignored.

CEMT SET FILE

Read syntax diagramSkip visual syntax diagramCEMT SET FILE( value)ALLOPENCLOSEDFORCECLOSEENABLEDDISABLEDREADNOREADUPDATENOUPDATEADDABLENOADDABLEBROWSENOBROWSEDELETENODELETEEXCLUSIVENOEXCLUSIVEEMPTYREQNOEMPTYREQOLDSHARERLSNOTRLSDSNAME( value)NOTTABLECICSTABLEUSERTABLECFTABLELOADNOLOADCFDTPOOL( value)TABLENAME( value)CONTENTIONLOCKINGMAXNUMRECS( value)KEYLENGTH( value)RECORDSIZE( value)

Options

(value)
One or more file names (1 - 8 characters).
ADDABLE
You can add records to the file.
ALL
Any change you request is made to all files that you are authorized to access.
BROWSE
You can browse records in the file.
CFDTPOOL (value)
Specifies the name of the CFDT pool in which the coupling facility data table resides.
CFTABLE
The file name represents a coupling facility data table.
CICSTABLE
The file name represents a CICS-maintained data table.
CLOSED
The file is closed; the access method does not allow accesses to the data until the file is opened. The file can be opened either explicitly by the user or, if the file has the ENABLED attribute, implicitly by CICS on the next reference to the file.

When the SET FILE CLOSED command is used, the file is closed and also disabled (set UNENABLED). (A file disabled in this way prevents access requests from implicitly opening the file again.) The close is effected at the time of the command only if there are no tasks currently accessing the file. If there are current users, the display indicates CLOSE requested. This means that, when the last user finishes using the file, it effects the close.

A file that has been disabled by a SET FILE CLOSED command becomes enabled again by a subsequent SET FILE OPEN command. To distinguish a file that has been disabled by a SET FILE CLOSED from one that has been disabled by a SET FILE DISABLED command, the SET FILE CLOSED command closes the file with the UNENABLED attribute.

A file with the DISABLED attribute can be enabled only by a SET FILE ENABLED command. A file with the UNENABLED attribute can be enabled by a SET FILE ENABLED or SET FILE OPEN command.

CONTENTION (CFDT ONLY)
The coupling facility data table is to use the contention model, in which records are not locked when they are read for update, but an error is returned on a subsequent REWRITE or DELETE if the record has changed or been deleted since it was read for update.
DELETE
You can delete records from the file.
DISABLED
The file is not available for use by transactions except for those that are currently using it. If there are any such users, BEING DISABLED is also displayed. The CEMT SET FILE DISABLED command has no effect on existing users; it prevents new users from accessing the file.

The file can be reenabled by a SET FILE ENABLED command. (See also UNENABLED.)

It is not possible to disable a remote file.

DSNAME (value)
Specifies the name (1 - 44 characters) of the VSAM or BDAM data set with which this file is associated. CEMT SET FILE(value) DSNAME(value) associates the data set with the file and causes the FILECOUNT of the data set to be incremented by 1. You can use CEMT SET FILE DSNAME with a null DSNAME value to dissociate a file from its current data set.
Note: DSNAME replaced OBJECTNAME.
EMPTYREQ (VSAM only)
Applies only to a VSAM file that has been defined to VSAM as a cluster with the REUSE parameter, and which is opened in non-RLS access mode. It indicates that when a file is next opened, its data is erased.

If the file is opened in RLS access mode this parameter has no effect.

A CEMT SET FILE EMPTYREC command can be applied only to files that are closed and either disabled or unenabled, and has no effect on the data until the file is opened. A SET FILE EMPTYREQ command can be canceled by a SET FILE NOEMPTYREQ command.

ENABLED
The file is available for use by transactions and, if closed, it is opened on the first request. If the command CEMT SET FILE(value) CLOSED ENABLED is given while the file is in use, the status of the file becomes closed-unenabled. If the command CEMT SET FILE(value) CLOSED is given while the file is in use, the file is disabled to prevent new users accessing the file.
EXCLUSIVE
Records on the file are protected from simultaneous update by being placed under exclusive control when a read for update is issued.
FORCECLOSE
Similar to SET FILE CLOSED, except that any existing users of the file are abended (abend code AKC3 or ATCH). As for CLOSED, the close is effected by the last of these users.
Note: Closing a file using the FORCECLOSE option causes tasks of any current users of the file to be terminated immediately by the CICS task FORCEPURGE mechanism. Data integrity is not guaranteed with this mechanism. In some extreme cases (for example, if an error occurs during backout processing) CICS might terminate abnormally. For this reason, closing files using the FORCECLOSE option should be restricted to exceptional circumstances.
KEYLENGTH (value)
Specifies the key length of records in a coupling facility data table that does not require pre-loading from a source data set. To set a key length, specify a value in the range 1 through 16. To clear a key length (set it to null values), specify KEYLENGTH(0).

You can specify the key length for a file that does not currently refer to a coupling facility data table, but which could be switched to use a coupling facility data table at a later date.

LOAD
The coupling facility data table requires loading from a source data set before it is fully usable; the transactions that use this coupling facility data table rely on it containing the records from the specified source data set.
LOCKING (CFDT ONLY)
The coupling facility data table is to use the locking model, in which records are locked when they are updated.
MAXNUMRECS (value)
Specifies the maximum number of records that the data table for this file can hold.

For any type of table, if you want to set a limit, specify a value in the range 1 through 99999999. If you do not want any limit to apply, specify MAXNUMRECS(0), which CICS interprets as no limit, and sets internally to the maximum positive fullword value (+2147483647 or X'7FFFFFFF').

Note: The new value takes effect only when a new data table is created. This happens on each file open for a CICS-maintained or user-maintained data table, but only when the table does not already exist for a CF data table. Once a coupling facility data table has been created, you can change the maximum number of records only through the CFDT server MVS™ command interface.

To specify MAXNUMRECS for a recoverable coupling facility data table, use a value that is between 5% and 10% more than the maximum number of records that the table is expected to contain. This allows for additional records that might be created internally for processing recoverable requests. The margin to be left for this internal processing depends on the level of use of the coupling facility data table, and the nature of that use. An effect of this is that the NOSPACE condition (with a RESP2 of 102) can be raised on a WRITE or REWRITE request to a recoverable coupling facility data table that apparently has fewer records than the MAXNUMRECS limit specifies.

NOADDABLE
You cannot add records to the file.
NOBROWSE
You cannot browse records in the file.
NODELETE
You cannot delete records from the file.
NOEMPTYREQ (VSAM only)
Applies only to VSAM files. Specifies that when a file is next opened, its data is not erased.

A CEMT SET FILE NOEMPTYREC command can be applied only to files that are closed and either disabled or unenabled, and cancels the implicit request in a previous SET FILE EMPTYREQ command.

NOEXCLUSIVE
Records on the file are not protected from simultaneous update.
NOLOAD
The coupling facility data table does not require loading from a source data set. It is fully usable as soon as it is created, and is populated entirely by the transactions that use it.
NOREAD
You cannot read records in the file.
NOTRLS (VSAM only)
The file is defined to be accessed in a non-RLS mode (LSR or NSR).

For information about switching from RLS to non-RLS mode, see the Troubleshooting for recovery processing.

NOTTABLE
The file name does not represent a data table.
NOUPDATE
You cannot update records in the file.
OLD
The disposition of the data set associated with the file is defined as unshared for dynamic allocation.
OPEN
The file is open. If the file is OPEN ENABLED, it is available for data accesses by CICS transactions. If it is OPEN DISABLED, it must first be enabled before it is available.

If the file was unenabled by a previous SET FILE CLOSED command, the SET FILE OPEN command reenables the file implicitly.

READ
You can read records in the file.
RECORDSIZE
Specifies the maximum record size for a coupling facility data table that does not require pre-loading from a source data set.

You can specify the record size for a file that does not currently refer to a coupling facility data table, but which could be switched to use a coupling facility data table at a later date. Specify a record size of 1 to 32767 bytes, or specify a record size of zero to remove a previously defined value.

RLS (VSAM only)
The file is defined to be accessed in RLS mode.
SHARE
The disposition of the data set associated with the file is defined as shared for dynamic allocation.
TABLENAME (value)
Specifies the name of the table for a coupling facility data table.
UPDATE
You can update records in the file.
USERTABLE
The file name represents a user-maintained data table.