Format-V QSAM records have control fields that precede the data. The QSAM logical record length is determined by adding 4 bytes (for the control fields) to the record length defined in your program, but you must not include these 4 bytes in the description of the record and record length.
LL Represents 2 bytes designating the length of the block (including the 'CC' field).
BB Represents 2 bytes reserved for system use.
ll Represents 2 bytes designating the logical record length (including the 'cc' field).
bb Represents 2 bytes reserved for system use.
The block length is determined as follows:
The operating system provides the control bytes when the file is written; the control byte fields do not appear in your description of the logical record in the DATA DIVISION of your program. COBOL allocates input and output buffers large enough to accommodate the control bytes. These control fields in the buffer are not available for you to use in your program. When variable-length records are written on unit record devices, control bytes are neither printed nor punched. They appear, however, on other external storage devices, as well as in buffer areas of storage. If you move V-mode records from an input buffer to a WORKING-STORAGE area, they'll be moved without the control bytes.
Files in the HFS are never blocked.
related concepts
Logical records
related tasks
Requesting variable-length format
related references
Layout of format-F records
Layout of format-S records
Layout of format-U records