Since the LOOKUP and SORTA operations are affected by the alternate collating sequence when ALTSEQ(*EXT) is specified, character compile-time arrays and tables are sequence-checked using the alternate collating sequence. If the actual collating sequence is not known until runtime, the array and table sequence cannot be checked until runtime. This means that you could get a runtime error saying that a compile-time array or table is out of sequence. Pre-run arrays and tables are also sequence-checked using the alternate collating sequence when ALTSEQ(*EXT) is specified. Note: The preceding discussion does not apply for any arrays and tables defined with ALTSEQ(*NONE) on the definition specification. Specifying an Alternate Collating Sequence in Your Source To specify that an alternate collating sequence is to be used, use the ALTSEQ(*SRC) keyword on the control specification. If you use the **ALTSEQ, **CTDATA, and **FTRANS keywords in the compile-time data section, the alternate-collating sequence data may be entered anywhere following the source records. If you do not use those keywords, the sequence data must follow the source records, and the file translation records but precede any compile-time array data. If a character is to be inserted between two consecutive characters, you must specify every character that is altered by this insertion. For example, if the dollar sign ($) is to be inserted between A and B, specify the changes for character B onward. See Appendix B, EBCDIC Collating Sequence for the EBCDIC character set. Formatting the Alternate Collating Sequence Records The changes to the collating sequence must be transcribed into the correct record format so that they can be entered into the system. The alternate collating sequence must be formatted as follows: Record Position 1-6 7-10 11-12 13-14
Entry ALTSEQ (This indicates to the system that the normal sequence is being altered.) Leave these positions blank. Enter the hexadecimal value for the character whose normal sequence is being changed. Enter the hexadecimal value of the character replacing the character whose normal sequence is being changed.
All groups of four beginning with position 15 are used in the same manner as positions 11 through 14. In the first two positions of a group enter the hexadecimal value of the character to be replaced. In the last two positions enter the hexadecimal value of the character that replaces it.
The records that describe the alternate collating sequence must be preceded by a record with ** ( = blank) in positions 1 through 3. The remaining positions in this record can be used for comments.
** ALTSEQ