Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Programming Guide


Layout of format-V records

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.

This image depicts QSAM format-V block and record layouts. Link to detail.

CC
The first 4 bytes of each block contain control information.

LL Represents 2 bytes designating the length of the block (including the 'CC' field).

BB Represents 2 bytes reserved for system use.

cc
The first 4 bytes of each logical record contain control information.

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


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)