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:
COBOL Development System | FCD Used |
---|---|
Visual COBOL | FCD3 |
Mainframe Express | FCD2 |
32-bit Enterprise Developer | FCD3 |
64-bit Enterprise Developer | FCD3 |
.NET COBOL support within Enterprise Developer | 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 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.