The DEFINE FILE command defines data tables

You use the DEFINE FILE command to define a file as either a CICS®-maintained data table or a user-maintained data table.

Full details of FILE definitions are given in FILE resources. Only the attributes that relate to data tables are described in this topic.

TABLE({NO|CICS|USER|CF})
Specify TABLE(CICS) to define the file as a CICS-maintained data table

Specify TABLE(USER) to define the file as a user-maintained data table

If you do not specify the TABLE parameter, or specify TABLE(NO), or TABLE(CF), the file is not defined as a CICS shared data table.

MAXNUMRECS(NOLIMIT|number)
Specifies the maximum number of records that can be contained in the data table, in the range 1 through 99999999. The default is that there is no limit on the maximum number of records.
FILE(name)
Specifies the name of the file.

For a CICS-maintained data table, this name is used to refer to both the data table and the source data set, which are treated as a single entity by CICS.

For a user-maintained data table, this name is used to refer to only the data table.

DSNAME(name)
Specifies the name of the VSAM KSDS to be used as the source data set. This must be a base data set, not a path, or an alternate index data set. If there is a path or alternate index associated with the source data set, any updates for a CICS-maintained data table, made via the file, are reflected in both the source data set and its alternate indexes. For a user-maintained data table, the updates are not reflected in either the source data set or its alternate indexes. After loading has completed, a user-maintained data table is entirely independent of its source data set.
LSRPOOLID(number|1)
This attribute is obsolete, but is supported to provide compatibility with earlier releases of CICS.
LSRPOOLNUM(number|1|NONE)
Specifies the number of the VSAM local shared resource (LSR) pool that is to be used by the data table. You must specify an LSRPOOL number, in the range 1 through 255. The default value is 1, unless a value has been specified for the NSRGROUP attribute, in which case the default value for LSRPOOLNUM is NONE.
OPENTIME({FIRSTREF|STARTUP})
Specifies when the file is to be opened, either on first reference or immediately after startup, by the automatically initiated transaction CSFU. OPENTIME(FIRSTREF) is assumed by default.

Remember that the data table is loaded when the file is opened, so if you are using the user exit XDTRD, make sure that the user exit is activated before the file is opened (see Activating user exits for data tables).

RECORDFORMAT({V|F})
Specifies the format of the records in the file—either RECORDFORMAT(V) for variable-length records or RECORDFORMAT(F) for fixed-length records.

RECORDFORMAT(V) is assumed by default. A user-maintained data table must have variable-length records.

ADD(NO|YES), BROWSE(NO|YES), DELETE(NO|YES), READ(YES|NO), and UPDATE(NO|YES)
Specifies the file operations that can be requested for the data table.

RECOVERY({NONE|BACKOUTONLY|ALL})
Specifies the type of recovery support that is required for the data table. The default is RECOVERY(NONE).

For a user-maintained data table, only dynamic transaction backout is supported by CICS, so RECOVERY(BACKOUTONLY) and RECOVERY(ALL) have the same meaning.

For a CICS-maintained data table, the RECOVERY parameter applies to the source data set; it must be consistent with any other file definition for the same data set.

The recovery attributes of a user-maintained data table are independent of any recovery attributes that its source data set might have.

When you define a user-maintained data table, you specify its recovery attributes on the file definition by specifying either RECOVERY(NONE) if it is to be unrecoverable, or RECOVERY(BACKOUTONLY|ALL) if it is to be recoverable after a transaction failure.

The source data set for the user-maintained data table can be unrecoverable, recoverable for backout only (after both transaction and system failures), or forward recoverable, regardless of what you have specified for the user-maintained data table.

The source data set can acquire its recovery attributes in one of two ways:
  • By having the recovery attributes for the data set defined in the ICF catalog (this is possible in CICS Transaction Server for z/OS®, Version 5 Release 1 for both RLS and non-RLS mode files).
  • By using another file name to access the data set as an ordinary CICS file, with the recovery attributes specified in the file definition (this is only possible in CICS Transaction Server for z/OS, Version 5 Release 1 for non-RLS mode files).


dfhf1kd.html | Timestamp icon Last updated: Thursday, 27 June 2019