Block Descriptor Word (BDW)

A variable-length block consists of a block descriptor word (BDW) followed by one or more logical records or record segments. The block descriptor word is a 4-byte field that describes the block. It specifies the 4 byte block length for the BDW plus the total length of all records or segments within the block.

There are two types of BDW. If bit 0 is zero, it is a nonextended BDW. Bits 1-15 contain the block length. Bits 16-31 are zeroes. The block length can be from 8 to 32␠760 bytes. All access methods and device types support nonextended BDWs.

If bit 0 of the BDW is one, the BDW is an extended BDW and BDW bits 1-31 contain the block length. Extended BDWs are currently supported only on tape.

When writing, BSAM applications provide the BDW; for QSAM, the access method creates the BDW. BSAM accepts an extended BDW if large block interface (LBI) processing has been selected (DCBESLBI in the DCBE control block is set on) and the output device is a magnetic tape. If an extended BDW is encountered and you are not using LBI, or the output device is not magnetic tape, an ABEND 002 is issued. IBM recommends that the BSAM user not provide an extended BDW unless the block length is greater than 32␠760 because an extended BDW would prevent SAM reading the data on lower-level DFSMS systems. Other programs that read the data set may also not support an extended BDW. QSAM creates extended BDWs only for blocks whose length is greater than 32 760, otherwise the nonextended format is used. When you read with either BSAM or QSAM, the access method interrogates the BDW to determine its format.

See Large Block Interface (LBI).