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

49
4 Using MERGE/XL Interactively
This chapter introduces using MERGE/XL in an interactive session. The examples show a
variety of MERGE/XL commands and options to provide an overview of how MERGE/XL
works. Refer to Chapter 6 for information on all SORT-MERGE/XL commands, including
their syntax, parameters, options, and examples of their operation.
Throughout this chapter three files (EMPLOYEE, NEWHIRES, and COMPANY) are used to
illustrate how MERGE/XL operates. They are patterned on typical information that might
be used by the Personnel Department of your company. The data is listed by the employee's
last name, first name, job title, and employee number. The file EMPLOYEE contains
previously sorted data for existing employees, and is designated as an >INPUT file in all
examples. The file NEWHIRES is an unsorted file containing a list of newly hired employees.
After it is sorted, it is also designated as an >INPUT file in all examples. The file COMPANY
contains the merged data from EMPLOYEE and NEWHIRES in various orders and is
designated as the >OUTPUT file in all examples.
Determining File Format
When creating a new file to be merged with an existing file, both files must have the
identical format. For example, when creating the file NEWHIRES to be merged with the
existing file EMPLOYEE, the beginning position of each key data item must be identical in
both files. The 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 4-1.
Figure 4-1. File Format For Merging
1 2 3 4
123456789012345678901234567890123456789012345
1 FISHER TOM SHIPPING CLERK 7309
2 TAYLOR HEATHER SECRETARY 7272
\---------/\---------/\-----------------/\--/
\/ \/ \/ \/
Last First Job Employee
Name Name Title Number