HPlogo SORT-MERGE/XL General Users Guide: HP 3000 MPE/iX Computer Systems > Chapter 3 Using SORT/XL Interactively

Determining the File Format

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

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 “File Format For Sorting”.

Figure 3-1 File Format For Sorting

                 1         2         3         4 

        123456789012345678901234567890123456789012345 



   1    FISHER     TOM        SHIPPING CLERK     7309 

   2    TAYLOR     HEATHER    SECRETARY          7272 

       \---------/\---------/\----------------/\--/ 

            \/        \/           \/         \/

            Last      First           Job      Employee 

            Name      Name           Title      Number 

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.

Feedback to webmaster