Download Print this page

HP 3000 Manual page 84

Mpe/ix computer systems, rpg/xl utilities
Hide thumbs Also See for 3000:

Advertisement

Record Type Specifications.
Column 6
The I identifies this an an include line. Input records which match the criteria specified by
this line will be used in the sort. Those which fail to meet the criteria will be omitted.
Column 7
The * indicates a comment line.
Column 8
Use only complete characters--one byte (eight bits)--in making comparisons.
Cols 9-12
Because the input record field for factor 1 is only one character long, this entry is left blank.
Cols 13-16
Input record position where factor 1 field begins and ends is position 40.
Cols 17-18
EQ means factor 1 must equal factor 2.
Column 19 The C means factor 2 is a constant.
Column 20 This is where the value of the constant is entered. In this instance, 1 is the factor 2 constant.
Field Description Specifications.
Column 6
The F identifies this as a field specification line.
Column 7
The N indicates that this is a normal control field. The D's in the column define the data
fields.
Column 8
The C tells the sort to use complete characters--1 byte (8 bits).
Cols 9-12
3, 23, and the other numbers indicate record positions where field start. They are the "from"
positions.
Cols 13-16
These are the positions in the records where the fields end. They are the "to" positions.
Here is the output of the sort.
1111111111AAA555555555505018156789
2111111112DDD444444446606028167890
2111111112XXX888888882202028123456
4111111114VVV666666664404118123457
4111111114ZZZ999999991101018112345
7111111117LLL777777773303128123456
Sample Sort 2
This sort produces a record address file for the selected records of the Sales History File. Records are
selected when they contain specific combinations of Sales Territory (SLSTER) and Merchandise Line
(MRCHLN). The output of this sort is a record address file containing relative record numbers for the
selected records. The sequences will be Garment Type Code and Merchandise Line within the garment
type. A hex dump of the output is followed by a simple RPG program which utilizes the output in a
meaningful report.
Two additional tasks are performed here:
1
It is desired to combine the Garment Type Codes 2 and 3 into a single category for sorting purposes.
Therefore, a "3" will be substituted for a "2" wherever it is encountered in the Garment Type code
field. (This is a conditional force on the control field.)
8- 86

Advertisement

loading