Control Fields (N, O, or F) Entries [ HP RPG/XL Utilities-Part 1 XSORT ] MPE/iX 5.0 Documentation
HP RPG/XL Utilities-Part 1 XSORT
Control Fields
(N, O, or F) Entries
When your file has more than one Record Section:
* The number of control fields do not have to be the same for all
Record Sections.
* The total lengths of all the control fields do not have to be the
same for all Record Sections (it is the maximum of these lengths that
is entered in Header Specification columns 13-17).
Normal and Opposite Control Fields (N and O) Entry
These are fields used by the program to sort your input records. They
are fields normally taken from the input records, although you can alter
or add to them using forced control fields. (See later sections for more
information concerning the use of forced control fields.)
Opposite Control Fields
At times you may wish to sort records so that some control fields are in
ascending order and some are in descending order. You use opposite
control fields to accomplish this.
Your Header Specification establishes the default sorting order. You
will sort in ascending order if you have specified descending order in
your Header Specification and called for an opposite control field. You
will sort in descending order if your Header Specification called for
ascending order and you enter O for an opposite control field.
XSORT changes your control fields while building the work records if you
specify opposite control fields. There is little reason to retain these
fields and usually they are dropped -- by entering an X in column 28 of
the Header line. If you wish to retain the original control fields in
your output records in a meaningful form, repeat the information as a
data field.
Sequencing Information with Control Fields
You determine the sequence of records in your Record-out sorts and the
record addresses in your Address-out sorts by the order in which you
describe control fields in your field description entries. How this
occurs is illustrated below.
Forced Control Fields
You can force a character into your control field by using forced
control. There are special considerations you should keep in mind when
you plan to use forced control fields.
* Only one character can be used in your forced control field.
* You can use either a conditional or an unconditional force.
* A force-all line must be preceded by one or more conditional force
lines.
MPE/iX 5.0 Documentation