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

50 Chapter4
Using MERGE/XL Interactively
Creating an Editor File
Since you want the file format for NEWHIRES to be identical to the file format of EMPLOYEE,
you would allow 11 characters (columns) for last names, beginning in position 1; 11
characters for first names, beginning in position 12; 19 characters for job 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.
If any of the key data items in the file NEWHIRES is longer than the number of characters
established for the key data items in the file EMPLOYEE you may need to alter the format in
both files. All characters exceeding established character limits are truncated and do not
appear in the file COMPANY.
Creating an Editor File
The MERGE/XL subsystem merges information contained in records from two or more
files. 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 also
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, 11:20 AM
© HEWLETT-PACKARD CO. 1985
/
The following example shows how to create a file named NEWHIRES using the EDIT/V SET
command tab function. The tab locations you establish can then be used to designate the
location of key data items with the >KEY command when merging files. Tabs automatically
align the data in the file for you.
After you access the EDIT/V subsystem, establish the tab character and the tabs for the
file to be created. To merge the new file NEWHIRES with the existing file EMPLOYEE, the key
data items must be located in the same positions (columns) in both files. Therefore, set the
tabs for the file NEWHIRES the same as those established for the file EMPLOYEE (12, 23, 42) in
Chapter 3. The exclamation point (!) is used as the tab character in this example.
/SET TABCHAR="!", TABS=(12, 23, 42)
To verify that the tab character and tabs are set correctly, enter:
/VERIFY TABCHAR, TABS
The system displays the message:
TAB CHARACTER = "!"
TABS = ( 12, 23, 42)