Sorting variable-length records
Your sort work file will be variable length only if you define it to be variable length, even if the input file to the sort contains variable-length records.
compiler determines that the sort work file is variable length if
you code one of the following elements in the
RECORD IS VARYINGclause
- Two or more record descriptions that define records that have
different sizes, or records that contain an
OCCURS DEPENDING ONclause
You cannot use
RECORDING MODE V for the
sort work file because the
SD entry does not allow
RECORDING MODE clause.
consideration: To improve sort performance of variable-length
files, specify the most frequently occurring record length of the
input file (the modal length) on the
card or in the
SORT-MODE-SIZE special register.