File Control Description (FCD)

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 system runs on a 32-bit or 64-bit operating system, as shown in the following table:

COBOL Development System FCD Used
Mainframe Express FCD2
32-bit Server Express Remote Development Option FCD2
64-bit Server Express Remote Development Option FCD3
.NET Support within Server Express Remote Development Option FCD3
32-bit Server Express FCD2 or FCD3
64-bit Server Express FCD3

Both FCD2 and FCD3 format can be used in 32-bit compilations. The copyfile XFHFCD.CPY defines an FCD3 record if the program is compiled with the Compiler directive P64. If the program is not compiled with the P64 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. The File Handler returns information to your program by writing it to the appropriate fields in the FCD.

All unused or reserved areas of the FCD must be set to binary zeros.

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) which point to the record area, filename area and key definition block.