HP 3000 Manuals

Supplying the Sort Specifications [ HP RPG/XL Utilities-Part 1 XSORT ] MPE/iX 5.0 Documentation


HP RPG/XL Utilities-Part 1 XSORT

Supplying the Sort Specifications 

XSORT specifications are normally entered through a job stream.
Interactive entry of specs is not recommended because XSORT does not
prompt for input.  You can use either XSORTEXT or $STDIN to supply sort
statements.

XSORT reads your specifications from the file whose formal file
designation is XSORTEXT. By default, XSORTEXT is associated with the
actual file designator, $STDIN. Specifications are read from XSORTEXT (or
$STDIN) and any errors in syntax are detected and communicated to you on
$STDLIST.

XSORT specifications must always be entered in the following order.

   1.  Header.

   2.  Alternate Collating Sequence.

   3.  S Option.

   4.  Record Type.

   5.  Field Description.

[]
You do not always need to use all the specification types for every sort; but the order in which the specifications are used doesn't vary. You always fill out Header Specifications first. The ALTSEQ (Alternate Collating Sequence) and the S (Special) Option specifications can be ignored if they are not to be used in the sort. However, S Option specifications must be supplied when your Input is from non-disk devices or when you are sorting multiple files. It is not necessary to fill out the Record Type entries if you wish to have all the records in the file sorted and they are all written in the same format. ----------------------------------------------------------------------------------------------- | | | | | Number of Records | Format of Records | Order of Specifications | | to be Sorted | to be Sorted | | | | | | ----------------------------------------------------------------------------------------------- | | | | | All the records in the | All the same. | 1. Header** | | file. | | 2. Field descriptions | | | | | ----------------------------------------------------------------------------------------------- | | | | | Some of the records in | All the same. | 1. Header** | | the file. | | 2. Record Type specs | | | | 3. Field descriptions | | | | | ----------------------------------------------------------------------------------------------- | | | | | All or some of the | Several different formats| For first record format: | | records in the file. | (record sections)* | 1. Header** | | | | 2. Record Type specs | | | | 3. Field descriptions | | | | | | | | For second record format: | | | | 4. Record Type specs | | | | 5. Field descriptions | | | | | | | | One set for each additional record fo|mat: | | | 6. Record Type specs | | | | 7. Field descriptions | | | | | ----------------------------------------------------------------------------------------------- * This does not mean that the records in the input file must be grouped in sections by format type. Just the specifications must be grouped (one section of Record Type and Field Description lines for each format type). The input records can be in any order. ** ALTSEQ and S Option, if used, would be entered following the Header Specification. Forms are provided in appendix D to facilitate your organizing specifications before entering them. The forms include 72 column spaces but entries can be extended to 80 columns. Copies of the forms may be made at your convenience. Detailed Instructions on how to enter the specifications and the optional entries appear in chapters 2 through 6 of the manual.


MPE/iX 5.0 Documentation