HP RPG/iX Utilities Reference Manual (30318-90006)
3-40
An Omit set can be preceded by the Header (or ALTSEQ or S Option, if used), Field Descriptions for the
previous section, or an include set. An Omit set can never be followed by Field Description lines. It must
be followed by an include set so that the program will know which of the remaining (non-omitted) records
you wish to have sorted.
Mixing Include and Omit Sets
You may find occasions when mixing include and omit sets would be helpful. The program readily accepts
the mix, but caution should be exercised since XSORT will accept and respond to commands in the order
they are coded. You may, for instance, wish to omit records with a 1 in position 3 while including those
with a 1 in positions 3 and 5. You would have to specify your include set first. If you began with your omit
set, you would eliminate all the records you wished to sort.
Column 8 Data Type
The Column 8 entry tells XSORT how to interpret data during the compare operations. To do this, the
program must first be told the format of the data that is to be compared.
XSORT accepts data in three formats:
Character (C) A character is an 8-bit pattern (byte) which represents a single alphabetic, numeric, special,
or control symbol based on the American Standard Code for Information Interchange
(ASCII).
Packed (P) Packed numerical data is compacted by storing two digits in each byte. Each digit is stored
as a 4-bit binary number with the sign represented by a 4-bit sign code placed in the right-
most, low order position in the field.
Unpacked (U) Unpacked numerical data is represented by a subset of the full ASCII character set, consist-
ing only of the numeric characters (0-9) andthe special sign characters for the rightmost digit
of numeric fields--positive ( {,A-I) and negative ( } ,J-R).
Importance of the Column 8 Entry
Through your Record Type Specifications you tell XSORT which records you want sorted. You do so by
instructing it to compare data in one field--factor 1--against a constant or data in another field on the same
record--factor 2. The result of the comparisons determines whether or not the record will be sorted. The
sort program sees your data as nothing more than a series of electronic bits. It must be told how to
interpret the data:
• Whether the data is numeric or character.
• If it is numeric, whether it is packed or unpacked.
Omit AND
and OR
Lines
O
O
O
....
O
A
One or more lines defining the characteristics of one Record Type.
First characteristic of a different Record Type than the previous line.
Additional characteristics for the same Record Type as the previous line.
Column 8 Entry Comparison Type Maximum Field Length*
C Character. 256 characters
P Numeric data is packed. 14 bytes (27 packed digits and sign)**
Type
Colum
n 6
Colum
n 7
Explanation