SORT-MERGE/XL General User's Guide (32650-90883)

Chapter 6 83
SORT-MERGE/XL Commands
INPUT (SORT/XL)
the
rec size
if the keys are of the
type
, BYTE, and ALTSEQ is used.) SFRS is in words.
SFRS+((SFRS*#
records
)/128) + 1
SFS is in sectors.
Compatibility Mode Scratch Filename
You can issue a file equation for the scratch file only to specify a particular logical device
which must be a disc. For example:
FILE SORTSCR; DEV=2
Native Mode Scratch File Size
Native mode scratch files contain two types of records: Work Records and End-of-Subfile
Records. The following algorithm calculates the size of one native mode scratch file.
Work Record Length (#Work Records + #End-of-Subfile Records)
= #Bytes in 1 scratch file
Where:
#Work Records = #Input Records
#End-of-Subfile Records = #Input Records / 50
and Work Record Length = Input Record Length + Expansion Bytes
The value of Expansion Bytes depends on the number and type of keys that the user
specifies. Expansion Bytes is expressed as:
#key 5's + #Key 9's + 2(#key 4's + #key 6's + 3key 7's +#key 8's +#key
12's) + 3(#key 13's) +3
The space used for a sort occuring in native mode will be two times the value returned by
this formula.
NOTE
This formula illustrates a worst case situation.
Native Mode Scratch Filenames
You cab issue file equations for the native mode scratch files only to specify a particular
device which must be a disc. For example:
FILE HPSORTS1; DEV=2
FILE HPSORTS2; DEV=2
DISCUSSION
When specifying more than one input file to SORT/XL, the list of files must be enclosed in
parentheses. This differs from the use of the >INPUT command for MERGE/XL, where
parentheses cannot be used. If more than one >INPUT command is entered, only the last
command is effective. Thus, all the files to be sorted must be specified in a single >INPUT