HP RPG/iX Utilities Reference Manual (30318-90006)

7-62
Case 1 - XSORTIN-and XSORTOUT are disk files.
Case 2 - XSORTIN=$STDIN and XSORTOUT=$STDLIST.
* Example #9 uses single file input. Count-only (SORTC) can also be used with multiple file input. To
determinethe appropriate commandsforamultiplefileSORTC,seeExample#8 regarding howitspecifies
multiple input files (XSORTIN1...XSORTIN9).
About the Sample Sort
A very simple sort was devised for these examples. The input file, named TSTIN, consists of five records.
AB123GSD212345 JONES X
AB234CICO12345 ALBERS
AC102GSD100001 WOODSON
AC321ABCD10001 FRANKEN
BB222CICO12345 WOODS
The specifications for most of the examples, whether entered by the user or supplied by the file, TSTSPEC,
are these:
00000HSORTR 4A X 33
00005I C 33NECX
00010FNC 6 9
00020FDC 1 32
00030FDV *
In examples 5 and 8, it is necessary to include an S Option specification for reasons which are explained
later. A file, TSTSPEX, which includes the S Option specs, was created for these examples. The entry in
columns 10-16, which limits the "maximum number of records to be sorted", is set for Example 8.
00000HSORTR 4A X 33
00000S Y 35
00005I C 33NECX
00010FNC 6 9
00020FDC 1 32
00030FDV *
In Example 7, a file named TSTFILE, which exists previous to the sort, is overlaid by the sorted file.
TSTFILE does not appear in the example as printed.
Sort Specifications
The specifications for our sort, if entered in the XSORT specification forms, would look like this: