Download Print this page

HP 3000 Manual page 31

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

Advertisement

Programming with ALTSEQ
Placing an alternate character in the sequence position which is normally assigned to another means that
both occupy the same position and are considered equal. (See Sample ALTSEQ Statements section in this
chapter.)
If you do not want to have the characters regarded as equal, the one which normally occupies that position
must be moved.
Effect of ALTSEQ Statements on Other Coding
ALTSEQ statements can change:
1
Factor 1 and factor 2 (See Record Type Specifications, Section 5).
2
Normal and opposite control fields.
3
Characters in control fields before they are replaced by forced fields.
ALTSEQ statements do not change data fields in records or forced control field characters.
Sample ALTSEQ Statements
1
If you wished to make blanks and zeros equal in your collating sequence you would enter the fol-
lowing:
Blank (20) is moved to the position occupied by zero (30). Blanks and zeros are, therefore, consid-
ered equal.
2
If you wished to change the sequence of several characters you should do the following:
2A45 means * (2A) will occupy the position normally occupied by E (45).
4647 means F (46) will occupy the position normally assigned to G (47).
The collating sequence, from character ")" through "H", would be changed:
from: )*+.....ABCDEFGH
to:
) +.....ABCD*E H
In this example, F and G would occupy the same position.
ALTSEQ 2030
ALTSEQ 2A4545464647
F
G
3-33

Advertisement

loading