HP RPG/iX Utilities Reference Manual (30318-90006)

3-33
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:
ALTSEQ 2030
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:
ALTSEQ 2A4545464647
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
F
to: ) +.....ABCD*E H
G
In this example, F and G would occupy the same position.