File Control Description (FCD)

The fields contained in the FCD are shown in the following table. The fields do not necessarily appear in this order; the order is defined in the copybook or xfhfcd3.cpy. For flags, the description refers to when the bit is set on. Bit 7 is the most significant (leftmost) bit. Unused bits are reserved for future use.

Refer to the Operation Codes section to display details of how each operation uses these fields.
fcd-file-status (fcd-status-key-1, fcd-status-key-2)
Type: pic x
User file status. After every operation except a COMMIT or ROLLBACK operation, this field is updated with a standard file status value telling you the status of the operation. See also fcd-access-mode and fcd-status-type.
fcd-length
Type: pic xx comp-x
Length of FCD. For FCD3 only.
fcd-version
Type: pic x comp-x
Version number. Values can be:
0 FCD2
1 FCD3
fcd-organization
Type: pic x comp-x
File organization. Values can be:
0 Line sequential
1 Sequential
2 Indexed
3 Relative
fcd-access-mode
Type: pic x comp-x
User status and access mode indicators.

User status is indicated by bit 7. The bit is set if you have defined a file status. Defining a file status can affect how some operations (such as RETRYLOCK) are performed. When calling the File Handler directly, this bit should be set. However, file status is obtained directly from fcd-file-status.

Access mode is indicated by bits 6 through 0:

0 Sequential access mode
4 Random access mode
8 Dynamic access mod
fcd-open-mode
Type: pic x comp-x
Open mode:
0 INPUT
1 OUTPUT
2 I/O
3 EXTEND
128 File is closed

You must set this field to 128 before opening a file.

fcd-recording-mode
Type: pic x comp-x
Recording mode:
0 Fixed
1 Variable
fcd-file-format
Type: pic x comp-x
File format:
0 Default format
1 C-ISAM
2 Level II V2.5 COBOL
3 IDXFORMAT"3"
4 IDXFORMAT"4"
8 IDXFORMAT"8"
11 Mainframe print file
12 IDXFORMAT"12"
14 Heap file
15 ESDS
fcd-device-flag