Fixed-format records

These are the formats you can specify for RECFM if you want to use a fixed-format file:
F
Fixed-length, unblocked
FA
Fixed-length, ASA print-control characters
FB
Fixed-length, blocked
FM
Fixed-length, machine print-control codes
FS
Fixed-length, unblocked, standard
FBA
Fixed-length, blocked, ASA print-control characters
FBM
Fixed-length, blocked, machine print-control codes
FBS
Fixed-length, blocked, standard
FSA
Fixed-length, unblocked, standard, ASA print-control characters
FSM
Fixed-length, unblocked, standard, machine print-control codes
FBSM
Fixed-length, blocked, standard, machine print-control codes
FBSA
Fixed-length, blocked, standard, ASA print-control characters.
In general, all references to files with record format FB also refer to FBM and FBA. The specific behavior of ASA files (such as FBA) is explained in Using ASA text files.
Attention: z/OS® XL C/C++ distinguishes between FB and FBS formats, because an FBS file contains no embedded short blocks (the last block may be short). FBS files give you much better performance. The use of standard (S) blocks optimizes the sequential processing of a file on a direct-access device. With a standard format file, the file pointer can be directly repositioned by calculating the exact position in that file of a given record rather than reading through the entire file.

If the records are FB, some blocks may contain fewer records than others, as shown in Figure 1.

Figure 1. Blocking fixed-length records
graphic