Each record segment consists of a segment descriptor word (SDW) followed by the data. The segment descriptor word, similar to the record descriptor word, is a 4 byte field that describes the segment. The first 2 bytes contain the length (LL) of the segment, including the 4 byte SDW. The length can be from 5 to 32 756 bytes. The third byte of the SDW contains the segment control code that specifies the relative position of the segment in the logical record. The segment control code is in the rightmost 2 bits of the byte. The segment control codes are shown in Table 1.
Binary Code | Relative Position of Segment |
---|---|
00 | Complete logical record |
01 | First segment of a multisegment record |
10 | Last segment of a multisegment record |
11 | Segment of a multisegment record other than the first or last segment |
The remaining bits of the third byte and all of the fourth byte are reserved for possible future system use and must be 0.
Data mode is similar to move mode, but allows reference only to the data portion of the logical record (that is, to one segment) in your work area. The logical record length is passed to you through the DCBLRECL field of the data control block.
In locate mode, both GET and PUT process one segment at a time. However, in locate mode, if you provide your own record area using the BUILDRCD macro, or if you ask the system to provide a record area by specifying BFTEK=A, then GET, PUT, and PUTX process one logical record at a time.