SORT-MERGE/XL General User's Guide (32650-90883)
Chapter 2 19
Getting Started With SORT-MERGE/XL
Key Data Items
Key Data Items
In SORT-MERGE/XL a key data item is a group of alphabetic, numeric, or alphanumeric
characters. The key data item is used by SORT-MERGE/XL as a reference to find and
arrange the data in a specified order. You specify a key data item by identifying its position
(column) in the record and its length (number of succeeding columns) with the >KEY
command.
A record is a continuous collection of related data that is treated as one unit. A record can
consist of more than one line of data in a file. It is continued to subsequent lines by
entering an ampersand (&) as the last nonblank character on a line.
To define a key data item with the >KEY command, enter:
>KEY 40, 12
This specifies a key data item that begins in the 40th character position (column) of the
record and is 12 characters (columns) long.
You can sort or merge data based on one or more key data items.
Sorting Files By A Single Key Data Item
SORT-MERGE/XL can sort or merge files based on a single key data item within a record.
Figure 2-1. shows three records of data in a file. Each record is one line in length. Each
record contains a person's last name, first name, occupation, and social security number.
The last name starts in column 1, the first name in column 10, the occupation in column
25, and the social security number in column 40.
>RESET — The>RESET command corrects errors made while
issuing the >KEY command.
>SHOW >SH The >SHOW command displays the collating
sequence or the translation table.
>VERIFY >V The >VERIFY command displays the various
options specified for a particular sort or merge
operation.
>:MPE Command — The colon command (:) is entered prior to issuing
MPE XL system commands from within either
SORT/XL or MERGE/XL.
>:EOD — The >:EOD command terminates the list of input
records to SORT/XL when the terminal ($STDIN)
is used as the input file.
Table 2-1. SORT-MERGE/XL Commands
Command Abbreviation Function