Columns 9-16 Field Locations [ HP RPG/XL Utilities-Part 1 XSORT ] MPE/iX 5.0 Documentation
HP RPG/XL Utilities-Part 1 XSORT
Columns 9-16
Field Locations
Columns 9-16 locate the input record positions that contain the field.
The starting position (from) is identified in columns 9-12. The end
position (to) is identified in columns 13-16.
The order you impose in your Field Description Specifications will
determine the order in which they will be located in the output records.
For example, suppose your input records look like this.
Input Record
|------| |-------| |----------------| |---------------|
Field name | ITEM | | PRICE | | ITEMS IN STOCK | | REORDER POINT |
|------| |-------| |----------------| |---------------|
record 1 9 10 14 15 23 24 30
position
And this is the way you want your output record to look.
Output Record
|------|----------------|----------------|
Field name | ITEM | REORDER POINT | ITEMS IN STOCK |
2205 |------|----------------|----------------|
record 1 9 10 16 17 25
position
If you wanted to sort your records by item number, this is the way you
would enter your Field Description Specifications.
When you have a one-character control field, the procedure is the same
with one exception. When the fields are only one character long, you
leave columns 9-12 (from) blank and enter the number of the record
position containing the character in columns 13-16.
As an example, suppose you wanted the 1-character field in position 12 of
your input record to be in the first position of the sorted output
record. You would describe the field in the first line of your Field
Description Specifications, entering it as below.
Right-justifying entries is recommended. The starting (from) position of
the input records ends in column 12. The end (to) position ends in
column 16. In the example above, because it is a 1-character field, the
9-12 positions are left blank and the entry of the character's position
is right-justified in column 16.
MPE/iX 5.0 Documentation