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:
- 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:
- 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
- Type: pic x comp-x
- Device flag:
0
|
Normal |
1
|
Device |
2
|
Stdin |
3
|
Stdout |
4
|
stderr |
5
|
Badname |
6
|
Input pipe |
7
|
Output pipe |
8
|
I/O pipe
|
9
|
Library |
10
|
Disk file
|
11
|
Null |
12
|
Disk redir |
13
|
No map |
- fcd-lock-action
- Type: pic x comp-x
- Reserved.
- fcd-data-compress
- pic x comp-x
- Data compression routine indicator:
0
|
No compression |
1-127
|
Micro Focus data compression routine number (1= CBLDC001) |
128 -255
|
User-defined data compression routine number (128=USRDC128) |
- fcd-blocking
- Type: pic x comp-x
- Node length in bytes:
0
|
Node length determined by system |
1
|
512 |
2
|
1024 |
4
|
4096 |
6
|
16384 |
- fcd-idxcache-size
- Type: pic x comp-x
- Number of index nodes held in cached memory. The number specified should be between 4 and 255. When set to 0, a default of
16 is used.
- fcd-percent
- Type: pic x comp-x
- Percentage indicator
- fcd-block size
- Type: pic x comp-x
- Block size for data records in bytes:
0
|
No blocking |
12
|
4096 |
13
|
8192 |
14
|
16384 |
15
|
32768 |
16
|
65536 |
For indexed and relative files, non-zero settings can degrade performance.
- fcd-flags-1
- Type: pic x comp-x
-
Bit 7
|
Mainframe compatibility bit. When set, file characteristics are not required to match those specified in program. |
Bit 5
|
READ and START operations will return the key (only) in the record area |
Bit 1
|
TRACE=ON |
Bit 0
|
Reserved |
- fcd-flags-2
- pic x comp-x
- Bit 0 sets CONVERTDBSPACE=ON
- fcd-mvs-flags
- pic x comp-x
- Mainframe emulation flags
Bit 2
|
File is implicit file (ACCEPT or DISPLAY) |
Bit 1
|
AMODE(31) is on |
Bit 0
|
AMODE(24) is on |
- fcd-mvs-flags-2
- pic x comp-x
- Additional mainframe emulation flags
Bit 3
|
DATA(31) is on when AMODE(64) is on |
Bit 2
|
AMODE(64) is on |
Bit 0-1
|
Reserved |
- fcd-status-type
- pic x comp-x
- Status type:
Bit 7
|
Set on for ANSI'85 COBOL file status by default, set off for ANSI'74 COBOL file status
|
Bit 6
|
SPACEFILL=OFF |
Bit 5
|
STRIPSPACE=OFF |
Bit 4
|
EXPANDTAB=OFF |
Bit 3
|
LSRECDELIM=0D0A |
Bit 2
|
INSERTTAB=ON |
Bit 1
|
INSERTNULL=ON |
Bit 0
|
Reserved |
Bits 1 and 2 are set or unset by the File Handler at open time, depending on the settings of the N and T RTS switches. These
bits can be set or unset after an OPEN operation to override the N and T RTS switches. Bit 3 means 'Use the other sort of
line sequential record delimiter'.
- fcd-other-flags
- Type: pic x comp-x
-
Bit 7
|
OPTIONAL file (OPEN INPUT) |
Bit 6
|
IGNORELOCK=ON |
Bit 5
|
Not OPTIONAL (OPEN I/O and EXTEND)
|
Bit 4
|
Filename is EXTERNAL
|
Bit 3
|
Reserved |
Bit 2
|
NODETECTLOCK directive enabled |
Bit 1
|
Multiple reel file (record sequential)
|
Bit 0
|
Line advancing file (record sequential) |
- fcd-trans-log
- Type: pic x comp-x
-
Bit 7
|
OPENINPUTSHARED=ON |
Bit 5
|
READSEMA=OFF |
Bit 4
|
EXPANDPOSITIONING=ON
|
Bit 1
|
FASTREAD=OFF |
Bit 0
|
SUPPRESSADV=ON
|
- fcd-lock-types
- Type: pic x comp-x
-
Bit 7
|
Interlanguage locking (LOCKTYPE 1 or 2) |
Bit 6
|
SHARING WITH READ ONLY |
Bit 5
|
Separate lock file (LOCKTYPE 2) |
Bit 4
|
RUNITLOCKDETECT=OFF |
Bit 3
|
Use NFS file locking |
Bit 2
|
Use NFS file locking with HP compatibility |
- fcd-fs-flags
- Type: pic x comp-x
- Fileshare flags:
Bit 7
|
Transaction logging |
Bit 3
|
Trace OPEN and CLOSE operations
|
- fcd-config-flags
- Type: pic x comp-x
-
Bit 7
|
WRITETHRU |
Bit 6
|
Use relative byte address
|
Bit 5
|
Update current record pointer
|
Bit 4
|
For FCD2 use
fcd-reladdr-big for relative byte address instead of
fcd-reladdr-offset |
Bit 1
|
Call status conversion routine |
Bit 0
|
Set if IGNORELOCK required
|
- fcd-misc-flags
- Type: pic x comp-x
- Miscellaneous flags:
Bit 7
|
HOSTFD option (record areas allocated at OPEN time)
|
Bit 1
|
File defined with EXTERNAL syntax
|
Bit 0
|
File closed with lock
|
- fcd-config-flags2
- Type: pic x comp-x
-
Bit 7
|
Use EBCDIC collating sequence
|
Bit 6
|
Set if file is to have WRITE AFTER ADVANCING
|
Bit 5
|
Set if file is to have WRITE BEFORE ADVANCING
|
Bit 4
|
ADV specified
|
Bit 3
|
Ignore minimum length checking on variable-length files
|
- fcd-lock-mode
- Type: pic x comp-x
- Lock mode flags for shareable files:
Bit 7
|
Lock on multiple records |
Bit 6
|
WRITELOCK directive enabled |
Bit 5
|
RETRYOPEN=ON |
Bit 4
|
SKIPLOCK =ON |
Bit 3
|
RETRYLOCK=ON |
Bit 2
|
Lock mode MANUAL
|
Bit 1
|
Lock mode AUTOMATIC
|
Bit 0
|
Lock mode EXCLUSIVE
|
- fcd-shr2
- Type: pic x comp-x
- Miscellaneous flags:
Bit 1
|
RETRYTIME=ON |
Bit 0
|
STARTUNLOCK=ON |
- fcd-nls-id
- Type: pic xx comp-x
- NLS identifier
- fcd-fs-file-id
- Type: pic xx comp-x
- Reserved
- fcd-retry-open-count
- Type: pic xx comp-x
- RETRYOPEN count field
- fcd-name-length
- Type: pic xx comp-x
- Length of filename
- fcd-idxname-length
- Type: pic xx comp-x
- Reserved
- fcd-retry-count
- Type: pic xx comp-x
- Retry count (used when RETRYLOCK is on)
- fcd-key-id
- Type: pic xx comp-x
- Key-of-reference (indexed files), used for random READ operations. To specify the prime key, set this field to zero. For example,
to specify the first alternate key defined, use a value 1; the second alternate key defined use value 2.
- fcd-line-count
- Type: pic xx comp-x
- Line count (sequential files): the number of lines to skip when writing a file. For example:
WRITE AFTER ADVANCING line-count LINES
- fcd-use-give
- Type: pic xx comp-x
- Reserved
- fcd-key-length
- Type: pic xx comp-x
- Effective key length. When using a START operation on indexed files, you can specify only the leading part of a key instead
of the whole key. You should set this field to the number of bytes to be used in the comparison. It must be greater than zero,
and no bigger than the key being used.
- fcd-current-rec-len
- Type: pic x(2) comp-x for FCD2; pic x(4) comp-x for FCD3
- Current record length (in bytes)
- fcd-min-rec-length
- Type: pic x(4) comp-x
- Minimum record length (in bytes)
- fcd-max-rec-length
- Type: pic x(4) comp-x
- Maximum record length (in bytes)
- fcd-session-id
- Type: pic x(4) comp-x
- Process-id of the locking process on UNIX systems when using FCD3. This is only available for non-transactional files, and
does not apply when using Fileshare. On Windows platforms, this is reserved.
- fcd-reladdr-offset
- Type: pic x(4) comp-x for FCD2; pic x(8) comp-x for FCD3
- Relative byte address. (See also
fcd-config-flags, bit 4). The value of this field is undefined following the OPEN statement.
- fcd-reladdr-big
- Type: pic x(8) comp-x
- An eight-byte relative byte address. For FCD2, this is a separate field. For FCD3, it redefines
fcd-reladdr-offset. Provided for compatibility between FCD2 and FCD3.
- fcd-max-rel-key
- Type: pic x(8) comp-x
- Maximum size of relative key
- fcd-relative-key
- Type: pic x(8) comp-x
- Relative key.
This field is also used, for indexed files, to hold the number of records in the file. It is set following an OPEN.
- fcd-handle
- Type: pointer
- File handle
- fcd-record-address
- Type: pointer
- Pointer to the record area
- fcd-filename-address
- Type: pointer
- Pointer to the filename area
- fcd-idxname-address
- Type: pointer
- Reserved
- fcd-key-def-address
- Type: pointer
- Pointer to key definition block
- fcd-col-seq-address
- Type: pointer
- Pointer to a collating sequence (null if none is used)
- fcd-fildef-address
- Type: pointer
- Reserved
- fcd-dfsort-address
- Type: pointer
- Reserved