SORT-MERGE/XL General User's Guide
> Chapter 6 SORT-MERGE/XL CommandsINPUT (SORT/XL) |
||||||||||||||||||||
|
SYNTAX{$STDIN [ X ] } >I[NPUT] {* }[,#records][,recsize] {fname } {(fname1, fname2,...fnameN)} PARAMETERS
Compatibility Mode Scratch File SizeIf you want to extimate the scratch file record size (SFRS) and the scratch file size (SFS), use the following equations: SFRS + ((recsize + 7)/2) + 4where rec size is the input record size in bytes. (You must add the length of the keys to the rec size if the keys are of the type, BYTE, and ALTSEQ is used.) SFRS is in words. SFRS + ((SFRS*#records )/128) + 1SFS is in sectors. Compatibility Mode Scratch FilenameYou 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 SizeNative 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 BytesThe 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) +3The space used for a sort occuring in native mode will be two times the value returned by this formula.
Native Mode Scratch FilenamesYou 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 DISCUSSIONWhen 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 command. This command can be entered any time before the >END command. In the absence of the >INPUT command, any disc file with the formal designator >INPUT is considered the input file. Also, file equations may be issued before entering or during either subsystem. Thus, if the >INPUT command refers to the same file as specified in a file equation, the file's characteristics are determined by the file equation. The user issues the >RESET command before entering SORT/XL or MERGE/XL if the default values for the parameters of the file are desired. The same holds for the >OUTPUT command for SORT/XL and the >INPUT and >OUTPUT command for MERGE/XL. EXAMPLEIn the following example, the file EMPLOYEE is to be sorted with a maximum of 30 characters from each record: :SORT HP32214A.01.00 SORT/3000 THU, JUN 4, 1987, 9:50 AM (C) HEWLETT-PACKARD CO. 1986 >INPUT EMPLOYEE, 30 ADDITIONAL DISCUSSIONSee the >INPUT command for MERGE/XL in this chapter.
|