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

Chapter 3 35
Using SORT/XL Interactively
Multiple Key Alphabetical Sorting
>INPUT EMPLOYEE
>OUTPUT COMPANY
>KEY 1, 11; 12, 11; 23, 19
>END
PURGE OLD OUTPUT FILE COMPANY.GROUP.ACCOUNT ? Y
<<The SORT Statistics Appear Here>>
:EDITOR
HP32201A.07.17 EDIT/3000 WED, JUN 3, 1987, 8:31 AM
© HEWLETT-PACKARD CO. 1985
/TEXT COMPANY
FILE UNNUMBERED
/LIST 1/3
1 2 3 4
123456789012345678901234567890123456789012345
1 ANDERSON CHARLES PRESIDENT 0247
2 ANDERSON CHARLES SALES REP 3456
3 ANDERSON MARY ACCOUNTANT 6345
The three ANDERSON entries are now correctly alphabetized by last name, first name, and
job title. Notice in the last two examples that it is acceptable to enter multiple key data
items with the >KEY command either one to a line or all on one line.
In the above example, after you entered the >END command, the system displayed the
message:
PURGE OLD OUTPUT FILE COMPANY.GROUP.ACCOUNT ? Y
This message tells you that a file named COMPANY already exists in your group and
account, and asks if you want the old version purged. If you reply YES, the old version of
COMPANY is purged and a new version containing the information from this sort is created.
If you reply NO you are prompted for a new file name. You then enter a new, unique file
name and you have two files; the original file named COMPANY and the newly created file.