SORT-MERGE/XL General User's Guide (32650-90883)
Chapter 1 15
Introduction To SORT-MERGE/XL
The MERGE/XL Process
>KEY 1, 10
Specifies invoking the >KEY command and identifies the location of the data you want
sorted. For example, 1 identifies the location of the data (the first character position of each
line in the file) and 10 identifies the length of the data (in characters).
>END
Specifies invoking the >END command. The >END command indicates to the subsystem that
all commands have been entered and the sort specified should be performed. After the sort
operation is completed the data is stored in the specified file, the subsystem is exited, and
you are returned to the MPE XL colon prompt (:).
The sorted data is accessed through the text processing system you used to create the files
containing data to be sorted. The EDIT/V text editing subsystem is supplied with the 900
Series HP 3000. Check with your System Manager to determine what editors are available
on your system.
There are other SORT/XL commands you can use to manipulate data. Refer to Chapter 6
for additional information on commands.
The MERGE/XL Process
The procedure for using the MERGE/XL subsystem is explained below. By invoking just a
few commands, you can combine data from two or more sorted files into a single merged
file.
The following example shows accessing MERGE/XL, identifying the files to be merged,
identifying the file where the merged data is to be stored, the item(s) within the files to be
merged, and initiating the merge operation.
:MERGE
>INPUT
filename,filename...filename
>OUTPUT
filename
>KEY 1, 10
>END
Taking this example line by line:
:MERGE
Specifying MERGE at the MPE XL colon prompt (:) takes you into the MERGE/XL
subsystem and displays the subsystem chevron prompt (>). The ability to run a program,
such as MERGE.PUB.SYS, without explicitly using the MPE XL :RUN command is called an
Implied :RUN. You can use the :RUN command (:RUN MERGE.PUB.SYS) or simply enter
:MERGE to access the subsystem.
>INPUT
filename,filename...filename
Specifies invoking the MERGE/XL >INPUT command and identifies the files you want
merged. Files identified with the MERGE/XL >INPUT command must be sorted files.