You can use the PROGRAM COLLATING SEQUENCE
clause and the ALPHABET clause
of the SPECIAL-NAMES paragraph to establish the collating
sequence that is used in several operations on alphanumeric items.
These clauses specify the collating
sequence for the following operations on alphanumeric items:
- Comparisons explicitly specified in relation
conditions and condition-name conditions
-
HIGH-VALUE and LOW-VALUE settings
-
SEARCH ALL
-
SORT and MERGE unless
overridden by a COLLATING SEQUENCE
phrase in the SORT or MERGE statement
Example: specifying the collating sequence
The sequence that you use can be
based on one of these alphabets:
-
EBCDIC: references the collating sequence associated with the EBCDIC character set
- NATIVE: references the collating sequence
specified by the locale setting.
The locale setting refers to the
national language locale name in effect at compile time.
It is usually set at installation.
-
STANDARD-1: references the collating sequence associated with
the ASCII character set defined by ANSI INCITS X3.4,
Coded Character Sets - 7-bit American
National Standard Code for Information Interchange (7-bit ASCII)
-
STANDARD-2: references the collating sequence associated with
the character set defined by
ISO/IEC 646 -- Information technology -- ISO 7-bit coded
character set for information interchange, International Reference Version
- An alteration of the
ASCII sequence that you
define in the SPECIAL-NAMES paragraph
You can also specify a collating sequence that you define.
Restriction: If the code page is
DBCS, Extended UNIX
Code (EUC), or UTF-8, you
cannot use the ALPHABET clause.
The PROGRAM COLLATING SEQUENCE clause does not affect
comparisons that involve national or DBCS operands.