Before CICS® can open a file referencing a data set, there must be an installed file definition for that file. The definition can be installed either from the CSD or from a file control table (FCT). You can define VSAM files only through the CSD, and BDAM files only through the FCT. Definitions other than for BDAM in the FCT will not be installed, but are still supported because the DFHFCT macro is used by the migration utility that migrates file definitions to the CSD.
A file is identified by its file name, which you specify when you define the file. CICS uses this name when an application program, or the master terminal operator using the CEMT command, refers to the associated data set.
Each file must also be associated with its data set in one of the following ways:
The number of VSAM files that can be allocated to a CICS address space is about 10000. However, VSAM maintains a table entry for each file actually opened, and table space limits the number of files opened to about 8189.
You can define the data set in a DD statement in the JCL of the CICS startup job. The DD name must be the same as the file name that refers to the data set. For example, the following DD statements would correspond to file definitions for the file names VSAM1A and BDAMFILE:
//VSAM1A DD DSN=CICSTS31.CICS.vsam.user.file,DISP=OLD
//BDAMFILE DD DSN=CICSTS31.CICS.bdam.user.file,DISP=SHR
If you define a data set to CICS in this way it is allocated to CICS by MVS™ at CICS startup time, and it normally remains allocated until the end of the CICS run. Also, the physical data set is associated with the installed file definition throughout the CICS run.
If you use JCL to define a user data set to the CICS system, the DD statement must not include the FREE=CLOSE operand.
If you use the RLS=CR or RLS=NRI option on your DD statement, it will be ignored. The access mode for the file (RLS or non-RLS) and any read integrity options must be specified in the file definition.
When you are running CICS with XRF, you must specify DISP=SHR for data sets defined in JCL, so that the alternate CICS region can start while the active CICS region’s job is also in progress.
You can define a data set to CICS by specifying the DSNAME and DISP operands when you define the file. You can specify these parameters either using RDO for files, or by using DFHFCT macros (BDAM files only). If you want to use DSNAME and DISP from the file definition, do not provide a DD statement for the data set in the startup job stream, because the attributes in the DD statement will override those in the CICS resource definition.
If you use DSNAME and DISP on the file definition, CICS allocates the data set dynamically, at the time the first file referencing that data set is opened (that is immediately before the file is opened). At this stage, CICS associates the file name with the data set.
When CICS applications subsequently refer to the data set, they do so by specifying the file name. When you define a data set in this way, it is automatically deallocated by CICS when the file is closed.
For information about using the DSNAME and DISP parameters, see the SRT system recovery table and the FCT file control table in the CICS Resource Definition Guide
You can set the data set name dynamically in an installed file definition by using the master terminal CEMT command:
CEMT SET FILE(filename) DSNAME(datasetname) SHARE|OLD
When you use this command, CICS allocates the data set as part of OPEN processing as described above. The data set is automatically deallocated when the last file entry associated with the data set is closed. Before you can dynamically allocate a file using the CEMT command, the file status must be CLOSED, and also be DISABLED or UNENABLED.
This method of defining the data set to CICS allows a file definition to be associated with different data sets at different times. Alternatively, you can close the file and deallocate the data set and then reallocate and open the same file with a different DISP setting. For example, you could do this to enable the physical data set to be shared with a batch program, which reads the data set.
For information about the CEMT SET command, see the CICS System Programming Reference.
You are recommended to use only those methods of dynamic allocation that are part of CICS file control, and are described in the previous sections.
Do not use the CICS dynamic allocation transaction, ADYN, which invokes the sample CICS utility program, DFH99, for dynamic allocation of VSAM and BDAM user files. Use of the ADYN transaction may conflict with the dynamic allocation methods used within CICS file control, and can give unpredictable results.
Restrict the use of the ADYN transaction to those data sets not managed by CICS file control, such as auxiliary trace and CICS transaction dump data sets.
For information about the CICS samples, see the CICS/ESA 4.1 Sample Applications Guide.
[[ Contents Previous Page | Next Page Index ]]