The File Control Description (FCD) is a data area which contains information about the file in use. There are two versions of the FCD, and which one is used depends on whether your COBOL development environment is running in 32-bit or 64-bit, as shown in the following table:
Both FCD2 and FCD3 format can be used in 32-bit compilations. The copybook XFHFCD.CPY defines an FCD3 record unless the program is compiled with the Compiler directive NOFCD3. If the program is compiled with the NOFCD3 directive XFHFCD.CPY defines an FCD2 record. The FCD3 record is directly and unconditionally defined in the file xfhfcd3.cpy and the FCD2 record is directly and unconditionally defined in the file xfhfcd2.cpy.
To use the File Handler, your program must set up an FCD, complete the appropriate fields (these vary according to the operation code) and then call the File Handler. All unused or reserved areas of the FCD must be set to binary zeros. The File Handler returns information to your program by writing it to the appropriate fields in the FCD.
The FCD used on the call to open a file must be the one used on all subsequent accesses to that file. You can perform multiple open operations on a file but you must use a different FCD for each open.
The FCD includes pointers (that is, USAGE POINTER data items) that point to the record area, filename area and key definition block.