Sequence Checking for Character Arrays
Sequence Checking for Character Arrays
Sequence checking for character arrays that have not been defined with ALTSEQ(*NONE) has two dependencies:
- Whether the ALTSEQ control specification keyword has been specified, and if so, how.
- Whether the array is compile time or prerun time.
The following table indicates when sequence checking occurs.
| Control Specification Entry | ALTSEQ Used for SORTA, LOOKUP and Sequence Checking | When Sequence Checked for Compile Time Array | When Sequence Checked for Prerun Time Array |
|---|---|---|---|
| ALTSEQ(*NONE) | No | Compile time | Run time |
| ALTSEQ(*SRC) | No | Compile time | Run time |
| ALTSEQ(*EXT) (known at compile time) | Yes | Compile time | Run time |
| ALTSEQ(*EXT) (known only at run time) | Yes | Run time | Run time |
Note: For compatibility with RPG III, SORTA and LOOKUP do not use the alternate collating sequence with ALTSEQ(*SRC). If you want these operations to be performed using the alternate collating sequence, you can define a table on the system (object type *TBL), containing your alternate sequence. Then you can change ALTSEQ(*SRC) to ALTSEQ(*EXT) on your control specification and specify the name of your table on the SRTSEQ keyword or parameter of the create command.