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

28 Chapter3
Using SORT/XL Interactively
Determining the File Format
Determining the File Format
When creating a file for sorting data, first determine the information to include and its
format. For example, the input file EMPLOYEE contains four key data items in each record
(employee's last name, first name, job title, and employee number). The format for the first
two lines of the file EMPLOYEE is shown in Figure 3-1.
Figure 3-1. File Format For Sorting
The file format shown in Figure 3-1 allots 11 characters (columns) for last names
beginning in position 1; 11 characters for first names, beginning in position 12; 19
characters for jobs titles, beginning in position 23; and 4 characters for employee numbers,
beginning in position 42. Use the starting position location for each key data item as tab
settings when creating the file. A single line record can contain up to 80 characters.
For clarity in reading the report when it is printed, allow enough characters for the longest
piece of information in each key data item, and some blank spaces between them.
When creating multiple files containing similar information to be sorted and then merged,
ensure the key data item starting positions and data length are identical in all files.
Creating an Editor File
The SORT/XL subsystem sorts information contained in records within a file. The example
files used in this manual were created using EDIT/V, which is supplied as a subsystem of
MPE XL on the 900 Series HP 3000. SORT-MERGE/XL can manipulate files created with
other editors such as Text and Document Processing/V (TDP/V). Check with your System
Manager to determine which editors are available on your system.
To access EDIT/V, at the MPE XL colon prompt (:), enter:
:EDITOR
The EDIT/V banner appears, followed by the subsystem slash prompt (/):
HP32201A.07.17 EDIT/3000 WED, JUN 3, 1987, 8:10 AM
1 2 3 4
123456789012345678901234567890123456789012345
1 FISHER TOM SHIPPING CLERK 7309
2 TAYLOR HEATHER SECRETARY 7272
\---------/\---------/\----------------/\--/
\/ \/ \/ \/
Last First Job Employee
Name Name Title Number