MPE/iX System Utilities Reference Manual (32650-90882)
207
23 SORT-MERGE/XL
SORT-MERGE/XL allows you to sort files by single or multiple key fields and to merge two or
more sorted files into a single new sorted file.
You may use SORT-MERGE/XL as a standalone utility (either interactively or in batch
mode), or from within a program. For information on how to use SORT-MERGE/XL
programmatically, refer to the SORT-MERGE/XL Programmer's Guide.
Operation
Using SORT
To invoke the
sort
portion of SORT-MERGE/XL enter:
SORT
or
RUN SORT.PUB.SYS
SORT-MERGE/XL responds with a message similar to this:
HP31900A.01.01 SORT/V TUE, JAN 2, 1990, 2:58 PM
(C) HEWLETT-PACKARD CO. 1987
It then presents a > prompt. At this prompt you must specify an INPUT file, an OUTPUT file
and sort KEY(s). For example:
> INPUT INFILE
> OUTPUT OUTFILE
> KEY 1,10
> KEY 11,6
> END
You may enter the parameters in any order. However, you must specify the keywords
OUTPUT, INPUT and KEY. You must use valid MPE/iX file names. If you qualify both files
with group and account names, you must have
read
access to the INPUT file and
write
access to the group and account for the OUTPUT file.
This example contains two keys, the first, beginning in byte one, which is 10 bytes long and
the second, beginning in byte 11, which is six bytes long. The first key entered is the
primary
key. Each successive key entered is
secondary
to the key entered before it.
The word END indicates you are finished entering parameters and signals SORT-MERGE/XL