HPlogo SORT-MERGE/XL General Users Guide: HP 3000 MPE/iX Computer Systems > Chapter 1 Introduction To SORT-MERGE/XL

The MERGE/XL Process

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

The procedure for using the MERGE/XL subsystem is explained below. By invoking just a few commands, you can combine data from two or more sorted files into a single merged file.

The following example shows accessing MERGE/XL, identifying the files to be merged, identifying the file where the merged data is to be stored, the item(s) within the files to be merged, and initiating the merge operation.

        :MERGE  

        >INPUT filename,filename...filename  

        >OUTPUT filename  

        >KEY 1, 10 

        >END  

Taking this example line by line:

        :MERGE  

Specifying MERGE at the MPE XL colon prompt (:) takes you into the MERGE/XL subsystem and displays the subsystem chevron prompt (>). The ability to run a program, such as MERGE.PUB.SYS, without explicitly using the MPE XL :RUN command is called an Implied :RUN. You can use the :RUN command (:RUN MERGE.PUB.SYS) or simply enter :MERGE to access the subsystem.

        >INPUT filename,filename...filename  

Specifies invoking the MERGE/XL >INPUT command and identifies the files you want merged. Files identified with the MERGE/XL >INPUT command must be sorted files.

        >OUTPUT filename  

Specifies invoking the MERGE/XL >OUTPUT command and identifies the name of the file where the merged data is to be stored. The file identified can be either a new or an existing file.

        >KEY 1, 10 

Specifies invoking the >KEY command and identifies the location of the data you want merged. For example, 1 identifies the location of the data (the first character position of each line in the file) and 10 identifies the length of the data (in characters). The data in all files you want merged must be aligned in identical formats.

        >END 

Specifies invoking the >END command. The >END command indicates to the subsystem that all commands have been entered and the merge operation specified should be performed. After the merge operation is completed the data is stored in the specified file, the subsystem is exited, and you are returned to the MPE XL colon prompt (:).

The merged data is accessed through the text processing system you used to create the files containing data to be sorted and merged. The EDIT/V text editing subsystem is supplied with the 900 Series HP 3000. Check with your System Manager to determine what editors are available on your system.

There are other commands you can use to merge data. Refer to Chapter 6 for additional information on commands.

Feedback to webmaster