For variable spanned records
Using the READ macro to get variable spanned records is the same as for fixed and variable records except that your program must make sure that all segments of the records are read. Variable spanned records use the SDW instead of the RDW. The SDW contains information on the length of a variable spanned record segment and whether a segment is the first, middle, last, or only part of the spanned record. See Segment descriptor word for more information.
The READ macro only starts input operations. To ensure that the operation completes successfully, you should issue a CHECK macro to test the data event control block (DECB). Otherwise, you will not get any notification of I/O errors or end-of-file conditions. For more information on the CHECK macro, see Using the CHECK macro.