The LENGTH parameter, usually optional, is required whenever the RECORD control statement is required.
The LENGTH parameter specifies the length of the record at various points during the processing of the application.
The number of length values can vary from 1 to 7. Only the l1, l2 and l3 values should be specified for fixed-length records and for merge or copy applications. All seven length values can be specified for variable-length sorts. If l1 is the only value specified, parentheses are optional. If l1 and additional length values are specified, they all must be enclosed in parentheses.
The length values are positionally dependent. An extra comma must indicate a missing length value between any two that are specified. Commas need not follow the final length value specified. For example, if LENGTH=(l1,,,l4) is specified, the omitted values are understood to be l2 and l3.
l1 |
The maximum record input length of the logical records. For variable-length records, this is the length of the longest logical record plus the 4-byte Record Descriptor Word. The 4-byte RDW must be included, even if the input is a VSAM file. The maximum record length cannot exceed 32,760 for fixed-length records and 32,767 for variable-length records. An LRECL value specified on the SORTIN/SORTINnn DD statement or the data set label will override the l1 value for fixed-length records. For variable-length records, the higher value (LRECL or l1) is used. This is ignored in a join application. |
l2 |
The maximum length of the logical records after E15 processing. An omitted l2 value defaults to the l1 value and indicates that the maximum record length has not been changed by an E15 exit. If there is no E15 exit, an l2 value which is smaller than the l1 value or the LRECL specified on the SORTIN/SORTINnn DD statement or data set label will truncate the records. This truncation will occur after the record is read from SORTIN. This is ignored in a join application. |
l3 |
The maximum length of the logical records after E35 processing. If the l3 value is omitted, the default is either the l2 value, or, if an INREC and/or OUTREC control statement is specified, the record length after INREC/OUTREC processing. Note that it is not necessary to specify an l3 value to reflect a length change due to INREC or OUTREC processing; the revised record length is calculated automatically. However, it is necessary to specify an l3 value if exit E35 has altered the record length. The LRECL value specified in the SORTOUT DD statement should either correspond to the l3 value or the LRECL specification should be omitted. In the latter case, MFX will automatically calculate the correct LRECL value. The l3 value is ignored if there is no E35 exit, so it is not possible to use the l3 value to truncate or pad the records. |
l4 |
The minimum length of the variable-length logical records plus the 4-byte Record Descriptor Word. An omitted l4 value defaults to the length from the beginning of the record to the end of the last field referenced by any control statement. |
l5 |
The most frequent record length of the variable-length records. Specify this length value to optimize the size of the segment, i.e., the fixed-length block of main storage, used to contain variable-length records. |
l6 |
The average work space required by each record, as reported by the HISTOGRM utility program. |
l7 |
The segment length recommended by the HISTOGRM utility program. If l7 is omitted, the SIZE parameter on the SORT control statement may be used to determine the impact of segment size on sort performance. Assuming the SIZE parameter reports a SORTIN data set of at least 10,000 records, MFX may sample the first 100-200 records to calculate an approximate segment size. An installation may decide to allow record sampling for smaller files. |