by Frank Yaeger » Wed Sep 17, 2008 9:20 pm
SORT FIELDS=(330,1,AQ,A)
Sorts the byte at position 330 according to the alternate collating sequence indicated by the ALTSEQ statement.
ALTSEQ CODE=(D500,D301,D702,E303,D404,C405,C106,E907)
Sets the alternate collating sequence as follows:
X'D5' (C'N') is collated as X'00'.
X'D3' (C'L') is collated as X'01'.
X'D7' (C'P') is collated as X'02'.
X'E3' (C'T') is collated as X'03'.
X'D4' (C'M') is collated as X'04'.
X'C4' (C'D') is collated as X'05'.
X'C1' (C'A') is collated as X'06'.
X'E9' (C'Z') is collated as X''07'.
So 'N' in position 330 is sorted first, then 'L', and so on.
Thus, the order of the records sorted by position 330 is N,L,P,T,M,D,A,Z.