HP 3000 Manuals

Application ##1 [ HP RPG/XL Utilities-Part 1 XSORT ] MPE/iX 5.0 Documentation


HP RPG/XL Utilities-Part 1 XSORT

Application #1 

The file containing the specifications for the sort is designated
TSTSPECA.

     HSORTR      5D              OX     72
     I C        3EQC1 } include set  \             INCLUDE IF 1 IN POSITION 3
     IAC        5EQC1 }               | one section     AND 5
     O C        3EQC1 } omit set     |             OMIT OTHERS WITH 1 IN POSITION
     I C        7NEC1 } include set  /             INCLUDE IF NOT 1 IN POSITION 7
     FNC    9   13
     FNC    9   13
     FDC    1   72

The comment section for the file explains what will be included and
omitted by the sort.  Note that the two include sets and one omit set
form a single Record Section.  Also, the sorted file will be in
descending order.

The input file, designated TSTINA, has comments which tell you whether
each record will be included or omitted, according to the specifications
in TSTSPECA.

     Positions             3 5 7 9-13      18-72 

                           1 1 1 A0001     =INCLUDE (1 IN POS.3 AND POS.5)
                           1 1 0 H9999     =INCLUDE (1 IN POS.3 AND POS.5)
                           1 0 1 N1045     =OMIT (1 IN POS.3)
                           1 0 0 B0002     =OMIT (1 IN POS.3)
                           0 1 1 A7523     =NOT INCLUDED (1 IN POS.7)
                           0 1 0 R3316     =INCLUDE (NOT 1 IN POS.7)
                           0 0 1 T9458     =NOT INCLUDED (1 IN POS.7)
                           0 0 0 B3257     =INCLUDE (NOT 1 IN POS.7)

Positions 3, 5, and 7 of the records contain different arrangements of
1's and 0's, and positions 9-13 are filled with information which will
determine the location of the sorted records with regard to the
descending order.

Here is the output file for the sort with the records marked to be
omitted missing.

                     0 1 0 R3316          =INCLUDE  (NOT 1 IN POS.7)
                     1 1 0 H9999          =INCLUDE  (1 IN POS.3 AND POS.5)
                     0 0 0 B3257          =INCLUDE  (NOT 1 IN POS.7)
                     1 1 1 A0001          =INCLUDE  (1 IN POS.3 AND POS.5)

The descending order is evident in the characters of the control field
described in positions 9-13.



MPE/iX 5.0 Documentation