Using the DEFINE FILE command to define data tables

Full details of how to use the DEFINE FILE command to define files are given in the CICS® Resource Definition Guide. Only the parameters that relate to data tables are described in this section.

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.

Note:
You can also specify CFTABLE to indicate a coupling facility 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 used as the source data set. This must be a base data set, not a path or 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 indices. For a user-maintained data table, the updates are not reflected in either the source data set or its alternate indices. After loading has completed, a user-maintained data table is entirely independent of its source data set.
LSRPOOLID(number|1)
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 8. The default is LSRPOOLID(1).
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 totally independent of any recovery attributes that its source data set may 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 non-recoverable, 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 non-recoverable, 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:

  1. By having the recovery attributes for the data set defined in the ICF catalog (this is possible in CICS Transaction Server for z/OS®for both RLS and non-RLS mode files.
  2. 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 for non-RLS mode files).

Example of a CICS-maintained data table definition

The following example shows the definition of a CICS-maintained data table. Only the relevant parameters are shown.

    File         ==> APPLE
    Group        ==> FRUIT
    DEscription  ==>
   VSAM PARAMETERS
    DSNAme       ==> CIC01.CICOWN.APPLES
    Password     ==>                    PASSWORD NOT SPECIFIED
    RLSACCESS    ==> NO                 YES|NO
    Lsrpoolid    ==> 2                  1-8 | None
    READINTEG    ==> UNCOMMITTED        UNCOMMITTED|CONSISTENT|REPEATABLE
    DSNSharing   ==> Allreqs            Allreqs | Modifyreqs
    STRings      ==> 005                1 - 255
    Nsrgroup     ==>
   REMOTE ATTRIBUTES
    REMOTESystem ==>
    REMOTEName   ==>
   REMOTE AND CFDATATABLE PARAMETERS
    RECORDSize   ==> 00080              1-32767
    Keylength    ==> 006                1-255 (1-16 For CF Datatable)
   INITIAL STATUS
    STAtus       ==> Enabled            Enabled | Disabled | Unenabled
    Opentime     ==> Startup            Firstref | Startup
    DIsposition  ==> Share              Share | Old
   BUFFERS
    DAtabuffers  ==> 00002              2 - 32767
    Indexbuffers ==> 00001              1 - 32767
   DATATABLE PARAMETERS
    TABLE        ==> CICS               No | Cics | User | CF
    Maxnumrecs   ==> 1000000            Nolimit  | 1-99999999
   CFDATATABLE PARAMETERS
    Cfdtpool     ==>
    TABLEName    ==>
    UPDATEModel  ==> Locking            Contention | Locking
    LOad         ==> No                 No | Yes
   DATA FORMAT
    RECORDFormat ==> F                  V | F
   OPERATIONS
    Add          ==> Yes                No | Yes
    BRowse       ==> No                 No | Yes
    DELete       ==> Yes                No | Yes
    REAd         ==> Yes                Yes | No
    Update       ==> Yes                No | Yes
   AUTO JOURNALING
    JOurnal      ==> No                 No | 1 - 99
    JNLRead      ==> None               None | Updateonly | Readonly | All
    JNLSYNCRead  ==> No                 No | Yes
    JNLUpdate    ==> No                 No | Yes
    JNLAdd       ==> None               None | Before | AFter |ALl
    JNLSYNCWrite ==> Yes                Yes | No
   RECOVERY PARAMETERS
    RECOVery     ==> All                None | Backoutonly | All
    Fwdrecovlog  ==> 10                 No | 1-99
    BAckuptype   ==> STAtic             STAtic | DYNamic
   SECURITY
    RESsecnum      : 00                 0-24 | Public

Example of a user-maintained data table definition

The following example shows the definition of a user-maintained data table. Only the relevant parameters are shown.

    File         ==> COURGETT
    Group        ==> VEGS
    DEscription  ==>
   VSAM PARAMETERS
    DSNAme       ==> CIC02.CICOWN.COURGETT
    Password     ==>                    PASSWORD NOT SPECIFIED
    RLSACCESS    ==> NO                 YES|NO
    Lsrpoolid    ==> 5                  1-8 | None
    READINTEG    ==> UNCOMMITTED        UNCOMMITTED|CONSISTENT|REPEATABLE
    DSNSharing   ==> Allreqs            Allreqs | Modifyreqs
    STRings      ==> 005                1 - 255
    Nsrgroup     ==>
   REMOTE ATTRIBUTES
    REMOTESystem ==>
    REMOTEName   ==>
   REMOTE AND CFDATATABLE PARAMETERS
    RECORDSize   ==> 00080              1-32767
    Keylength    ==> 006                1-255 (1-16 For CF Datatable)
   INITIAL STATUS
    STAtus       ==> Enabled            Enabled | Disabled | Unenabled
    Opentime     ==> Firstref           Firstref | Startup
    DIsposition  ==> Share              Share | Old
   BUFFERS
    DAtabuffers  ==> 00002              2 - 32767
    Indexbuffers ==> 00001              1 - 32767
   DATATABLE PARAMETERS
    TABLE        ==> User               No | CIcs | User | CF
    Maxnumrecs   ==> 2000000            Nolimit | 1-99999999
   CFDATATABLE PARAMETERS
    Cfdtpool     ==>
    TABLEName    ==>
    UPDATEModel  ==> Locking            Contention | Locking
    LOad         ==> No                 No | Yes
   DATA FORMAT
    RECORDFormat ==> V                  V | F
   OPERATIONS
    Add          ==> Yes                No | Yes
    BRowse       ==> Yes                No | Yes
    DELete       ==> No                 No | Yes
    REAd         ==> Yes                Yes | No
    Update       ==> Yes                No | Yes
   AUTO JOURNALING
    JOurnal      ==> No                 No | 1 - 99
    JNLRead      ==> None               None | Updateonly | Readonly | All
    JNLSYNCRead  ==> No                 No | Yes
    JNLUpdate    ==> No                 No | Yes
    JNLAdd       ==> None               None | Before | AFter |ALl
    JNLSYNCWrite ==> Yes                Yes | No
   RECOVERY PARAMETERS
    RECOVery     ==> Backoutonly        None | Backoutonly | All
    Fwdrecovlog  ==> No                 No | 1-99
    BAckuptype   ==> STAtic             STAtic | DYNamic
   SECURITY
    RESsecnum      : 00                 0-24 | Public

Related concepts
Resource definition for data tables
EXEC CICS commands for data tables
CEMT commands for data tables
[[ Contents Previous Page | Next Page Index ]]