Processing Records Longer than 32␠760 Bytes

A spanned record (RECFM=VS or RECFM=VBS) can contain logical records of any length, because it can contain any number of segments. While each segment must be less than 32␠760, the segments concatenated together into the logical record can be longer than 32␠760 bytes. A variable-length ISO/ANSI tape record (RECFM=D) can be longer than 32␠760 bytes. Some techniques for processing records longer than 32␠760 bytes follow.

Processing techniques for Format-D, Format-DS or Format-DBS Records (ISO/ANSI tapes):

DS/DBS records with a record length of over 32␠760 bytes can be processed using XLRI. (XLRI is supported only in QSAM locate mode for ISO/ANSI tapes.) Using the LRECL=X for ISO/ANSI causes an 013-D8 ABEND.

To use XLRI, specify LRECL=0K or LRECL=nK in the DCB macro. Specifying DCBLRECL with the K suffix sets the DCBBFTK bit that indicates that LRECL is coded in K units and that the DCB is to be processed in XLRI mode.

LRECL=0K in the DCB macro specifies that the LRECL value will come from the file label or JCL. When LRECL is from the label, the file must be opened as an input file. The label (HDR2) value for LRECL will be converted to kilobytes and rounded up when XLRI is in effect. When the ISO/ANSI label value for LRECL is 00␠000 to show that the maximum record length can be greater than 99␠999, you must use LRECL=nK in the JCL or in the DCB to specify the maximum record length.

You can express the LRECL value in JCL in absolute form or with the K notation. When the DCB specifies XLRI, the system converts absolute values to kilobytes by rounding up to an integral multiple of 1024. Absolute values are permissible only from 5 to 32␠760.

To show the record area size in the DD statement, code LRECL=nK, or specify a data class that has the LRECL attribute you need. The value nK can range from 1K to 16␠383K (expressed in 1024 byte multiples). However, depending on the buffer space available, the value you can specify in most systems will be much smaller than 16␠383K bytes. This value is used to determine the size of the record area required to contain the largest logical record of the spanned format file.

When you use XLRI, the exact LRECL size is communicated in the three low-order bytes of the RDW in the record area. This special RDW format exists only in the record area to communicate the length of the logical record (including the 4 byte RDW) to be written or read. (See the XLRI format of the RDW in Figure 1.) DCB LRECL shows the 1024 multiple size of the record area (rounded up to the next nearest kilobyte). The normal DS/DBS SDW format is used at all other times before conversion.