Change attributes of a VSAM or BDAM file, including files that refer to CICS shared data tables and coupling facility data tables.
SET FILE >>-+-SET FILE(data-value)----+--| options |-------------------->< '-SET DATASET(data-value)-'
Conditions: FILENOTFOUND, INVREQ, IOERR, NOTAUTH
options: .-WAIT-------. |--+------------+--+--------------+--+------------+-------------> +-ADD(cvda)--+ +-BROWSE(cvda)-+ +-BUSY(cvda)-+ +-ADDABLE----+ +-BROWSABLE----+ +-FORCE------+ '-NOTADDABLE-' '-NOTBROWSABLE-' '-NOWAIT-----' >--+----------------------+--+--------------+-------------------> '-CFDTPOOL(data-value)-' +-DELETE(cvda)-+ +-DELETABLE----+ '-NOTDELETABLE-' >--+-------------------+--+------------------------+------------> +-DISPOSITION(cvda)-+ +-DSNAME(data-value)-----+ +-OLD---------------+ '-OBJECTNAME(data-value)-' '-SHARE-------------' .--------------------------------. V | >--+-------------------+----+----------------------------+-+----> +-EMPTYSTATUS(cvda)-+ '-+-+-ENABLESTATUS(cvda)-+-+-' +-EMPTY-------------+ | +-DISABLED-----------+ | +-EMPTYREQ----------+ | '-ENABLED------------' | '-NOEMPTYREQ--------' '-+-OPENSTATUS(cvda)-+---' +-CLOSED-----------+ '-OPEN-------------' >--+-----------------+--+-----------------------+---------------> +-EXCLUSIVE(cvda)-+ '-KEYLENGTH(data-value)-' +-EXCTL-----------+ '-NOEXCTL---------' >--+----------------+--+-----------------------+----------------> +-LOADTYPE(cvda)-+ '-LSRPOOLID(data-value)-' +-LOAD-----------+ '-NOLOAD---------' >--+------------------------+--+-------------+------------------> '-MAXNUMRECS(data-value)-' +-READ(cvda)--+ +-NOTREADABLE-+ '-READABLE----' >--+------------------------+--+-----------------+--------------> '-RECORDSIZE(data-value)-' +-READINTEG(cvda)-+ +-UNCOMMITTED-----+ +-CONSISTENT------+ '-REPEATABLE------' >--+-----------------+--+---------------------+-----------------> +-RLSACCESS(cvda)-+ '-STRINGS(data-value)-' +-RLS-------------+ +-NOTAPPLIC-------+ '-NOTRLS----------' >--+-------------+--+-----------------------+-------------------> +-TABLE(cvda)-+ '-TABLENAME(data-value)-' +-CFTABLE-----+ +-CICSTABLE---+ +-NOTTABLE----+ '-USERTABLE---' >--+--------------+--+-------------------+----------------------| +-UPDATE(cvda)-+ +-UPDATEMODEL(cvda)-+ +-NOTUPDATABLE-+ +-CONTENTION--------+ '-UPDATABLE----' '-LOCKING-----------'
For more information about the use of CVDAs, see CICS-value data areas (CVDAs).
Any combination of the options can be set on one command. All changes, other than to close and disable the file, require that the file be in a CLOSED state, with an ENABLESTATUS of either DISABLED or UNENABLED, and they do not take effect until the file is next opened.
You can use the SET FILE command to set combinations of attributes that are relevant to more than one file type, to simplify switching between different types of file. Attributes that are not relevant to the current type of file are ignored. You can use this capability to set up dual-purpose file definitions, for example, by defining both local and remote attributes, or set attributes that make it easy to switch the file from accessing a user-maintained data table within a single MVS image to accessing a coupling facility data table within a Parallel Sysplex.
If a coupling facility data table already exists, and the table attributes specified on the SET FILE command do not match those with which it was created, an attempt to open the file fails with an error message.
If you use the SET FILE command to switch the file from referencing a coupling facility data table to a different object (for example from CFTABLE to NOTTABLE), the CFDT is not deleted and remains in existence in its pool (the coupling facility list structure).
The requested changes are applied in the following order: NOEMPTYREQ, CLOSED, DISABLED, miscellaneous, OPEN, ENABLED.
SET FILE ENABLED >>-EXEC CICS SET--FILE(data-value)--ENABLED--------------------><
Conditions: FILENOTFOUND, INVREQ, NOTAUTH
SET FILE DISABLED .-WAIT---. >>-EXEC CICS SET--FILE(data-value)--DISABLED--+--------+------->< +-NOWAIT-+ '-FORCE--'
Conditions: FILENOTFOUND, INVREQ, NOTAUTH
The SET FILE command allows you to change some of the attributes of a named VSAM or BDAM file. A security check is made and an unauthorized command attempt is given a NOTAUTH response. If any retained locks are associated with the file, the only attributes that you are allowed to change are the ENABLESTATUS and the OPENSTATUS. Attempting to specify any other attribute when there are retained locks causes an INVREQ condition to be raised.
If the file is associated with a coupling facility data table, DSNAME specifies the name of the source data set from which the table is loaded when the file definition specifies LOAD(YES).
With the SET FILE command, you can dissociate the file from any DSNAME by supplying a DSNAME value that begins with a null character (hexadecimal zeros).
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.
You can specify the load type for a file that does not currently refer to a coupling facility data table, but which might be switched to use a coupling facility data table at a later date.
If the file is not to share buffers, set this value to 0.
For a CICS-maintained or user-maintained data table, the value must be 1 or greater. Both these types of CICS shared data table must use LSR access mode (unless the file is defined to be opened in RLS access mode).
For a coupling facility data table, you can set this value to 0.
For any type of table, if you want to set a limit, specify a value in the range 1 to 99 999 999. 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').
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 value 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.
The close request is deferred until all UOWs that hold repeatable read locks reach their syncpoint.
You can use the MVS MODIFY command to issue CFDT server commands that:
For a coupling facility data table, open processing causes the coupling facility data table server to create the table if it does not exist when CICS processes the open request. If the installed file definition specifies the name of a source data set, the coupling facility data table is created by loading the data from the source data set.
If a SET FILE(filename) OPEN command refers to a file that specifies LOAD(YES), but which does not name the source data set, the CFDT can be created and loaded only by opening a file that defines the source data set name.
If a recoverable data set is to be closed, the task the task issuing the close must commit any prior changes to that data set, or the request is rejected by file control.
CICS ignores a READINTEG option specified for a coupling facility data table.
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 zero to remove a previously defined value.
The non-RLS mode becomes either LSR or NSR, depending on the value specified for LSRPOOLID in the file resource definition.
CVDA values are:
See the CICS Recovery and Restart Guide for information about switching between RLS and non-RLS modes.
You can specify the table name 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.
You can specify the update model 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.
In all cases of IOERR, the CICS console should be examined for messages providing more information on the error.
Depending on how you are viewing the RESP2 value, you should be aware that it may contain the decimal equivalent of the response returned to file control.
EXEC CICS SET FILE ('FILE12')
WAIT
CLOSED
DISABLED
DELETABLE
LSRPOOLID(7)
STRINGS(50)
EXEC CICS SET FILE ('FILE12')
OPEN
ENABLED
On the first command, the WAIT option tells CICS to allow all activity on FILE12 to quiesce before closing the file, and to return control to the issuing application only when this request has been started. When the file has been CLOSED, it is to be DISABLED. The records on FILE12 are then to be marked DELETABLE, LSRPOOL number 7 is to be associated with the file, and up to 50 concurrent operations are to be allowed.
The second of the two commands opens and then enables the file. Setting a file CLOSED and DISABLED makes the file eligible for deletion (DISCARD) or reinstallation by another task. Thus it is possible for another task to delete the file after the first SET command but before the second SET command.