Returns a string consisting of the character set of the National Language being used, in ascending order.
COLLATE()
or
COLLATE
The second syntax form can be used only when the BUILTIN attribute is specified.
DECLARE X CHARACTER(5); X = SUBSTR(COLLATE(), 100, 5); /* returns X = 'cdefg' */
This example assumes American English National Language support.
None.
Description
The COLLATE function returns a character string, of a length determined for the National Language support being used (128 characters for American English), that consists of the set of characters in the computer's character set in ascending order.
In Open PL/I, COLLATE returns a string consisting of the number of characters of the character set as determined by the National Language support.
The COLLATE function uses a 256-byte collating string.