HP RPG/iX Utilities Reference Manual (30318-90006)
3-42
Columns 17-18: Type of Comparison
This entry tells XSORT what kind of comparison you want to make between factor 1 and factor 2. You will
specify the type and location of factor 2 when you fill in columns 20-80 (if it is a constant) or 20-27 (if it is
another field in the same record). When you specify Alternate Collating Sequence, XSORT modifies factors
1 and 2 before making comparisons.
Column 19: Field or Constant
XSORT identifies records you want to sort by comparing the factor 1 field (specified in columns 9-16) with
either a constant or another field in the same record. Column 19 tells the program whether it is a field or
a constant that you wish to use in the comparison.
• C means a constant will be used.
• F means a field will be used.
When you put a C in column 19, you use columns 20-80 for the constant. When you put an F in column 19,
you use columns 20-27 to identify the location of the factor 2 field in the record.
Columns 20-27: Factor 2 Field
The factor 2 field must be the same length as the factor 1 field and in the same record as the factor 1 field.
These columns identify the location of the factor 2 field. Columns 20-23 (from) tell XSORT where the field
starts. Columns 24-27 (to) tell the program where the field ends.
Coding Entries
For readability, both "from" and "to" sections should be right-justified. This is, the "from" entry should end
in column 23, and the "to" entry should end in column 27.
Sometimes fields are only a single character in length. When there is only one character, skip the 20-23
entry, leaving it blank. Enter the column number of the record position containing the character in
columns 24-27.
Column 17-18 Entry Meaning
EQ Factor 1 must equal factor 2.
NE Factor 1 must not equal factor 2.
LT Factor 1 must be less than factor 2
GT Factor 1 must be greater than factor 2.
LE Factor 1 must be less than or equal to factor 2.
GE Factor 1 must be greater than or equal to factor 2.