Various operations, such as comparisons, sorting, and merging, use the collating sequence that is in effect for the program and data items. How you control the collating sequence depends on the code page in effect for the class of the data: alphabetic, alphanumeric, DBCS, or national.
A locale-based collating sequence for items with class alphabetic, alphanumeric, or DBCS applies only when the COLLSEQ(LOCALE) compiler option is in effect, not when COLLSEQ(BIN) or COLLSEQ(EBCDIC) is in effect. Similarly, a locale-based collating sequence for class national items applies only when the NCOLLSEQ(LOCALE) compiler option is in effect, not when NCOLLSEQ(BIN) is in effect.
When the COLLSEQ(LOCALE) or NCOLLSEQ(LOCALE) compiler option is in effect, the compile-time locale is used for language elements that have syntax or semantic rules that are affected by locale-based collation order, such as:
When the COLLSEQ(LOCALE) compiler option is in effect, the collating sequence for alphanumeric keys in SORT or MERGE statements is always based on the locale at run time.
related tasks
Specifying the collating sequence
Specifying the code page with a locale
Using environment variables to specify a locale
Controlling the alphanumeric collating sequence with a locale
Controlling the DBCS collating sequence with a locale
Controlling the national collating sequence with a locale
Accessing the active locale and code-page values
Setting sort or merge criteria
related references
Locales and code pages that are supported
COLLSEQ
NCOLLSEQ