SORT-MERGE/XL General User's Guide (32650-90883)

20 Chapter2
Getting Started With SORT-MERGE/XL
Key Data Items
NOTE
The examples in this chapter contain two extra lines of numbers (for example,
123456...9). These two extra lines are included to show that the data is
aligned in the columns established as key data items. These two extra lines
will not appear in your file.
Figure 2-1. Key Data Item Positions
To define the last name as the single key data item to be sorted alphabetically, enter:
>KEY 1, 9
The result of a sort done on the records shown in Figure 2-1. based on the command >KEY
1, 9, is shown in Figure 2-2. Note that the last names are now arranged in alphabetical
order.
Figure 2-2. Alphabetical Sort By Last Name
To define the social security number as the single key data item to be sorted numerically,
enter:
>KEY 40, 9
The result of a sort done on the records shown in Figure 2-1. based on the command >KEY
40, 9, is shown in Figure 2-3. Note that the social security numbers are now arranged in
ascending numerical order.
1 2 3 4
1234567890123456789012345678901234567890123456789
WELBY MARCUS PHYSICIAN 242244444
JONES SMOKEY TRUCKER 333887777
SOUSE EGBERT DETECTIVE 123234454
1 2 3 4
1234567890123456789012345678901234567890123456789
JONES SMOKEY TRUCKER 333887777
SOUSE EGBERT DETECTIVE 123234454
WELBY MARCUS PHYSICIAN 242244444