Use the Add CICS File Control Table (ADDCICSFCT) command to add an entry to the file control table (FCT). The FCT defines all the files, both local and remote, that are used either by CICS or by application programs. All files must conform to one of the VSAM file types:
- Key-sequence data set (KSDS), that is each record is accessed by predefined keys
- Entry-sequence data set (ESDS), that is each record is accessed by its relative byte address
- Relative-record data set (RRDS), that is each record is accessed by its record number
In CICS for every file you need an entry in FCT. So that where you can define all key parameters like how the file you are going to use.
There are two kinds of files – Local file and Remote file. Also, two file types are present one is Fixed and the other one is variable file.
- Existing fixed length file you cannot change. Since it has already records in it. So, you need to enable different file. So that all the new data with new record length is written into new file
- Variable files, you no need to worry about it. Anyway it allows records of different lengths
- The maximum record length in both the cases will be 32767 bytes.
The other points
- If the file is defined in remote system, then SYSID is needed. Else, if it is a local file the value should be *NONE
For local files the below parameters are needed
Enter the library and file name of the file that will be utilized by this file identifier. This field is valid only for a local file, that is when the system identifier field contains *NONE.
- Specify one of the following library values:
- *LIBL: The library list for the job that is associated with the CICS control region is used to locate the file.
- *CURLIB: The current library for the job that is associated with the CICS control region is used to locate the file. If no library is specified as the current library, the QGPL library is used.
- library-name: Specify the name of the library where the file is located.
- file-name: Specify the name of the file.
CEMT SET command
EMT SET FILE(filename) DSNAME(datasetname) SHARE|OLD
The above way you can define the file to cics. So that CICS acknowlwdges which file it should consider. You can refer for more here.