The CHAR function returns a one-character alphanumeric value that is a character in the program collating sequence having the ordinal position equal to the value of the argument specified.
The function type is alphanumeric.
| Format |
|---|
|
If more than one character has the same position in the program collating sequence, the character returned as the function value is that of the first literal specified for that character position in the ALPHABET clause.
If the current program collating sequence was not specified by an ALPHABET clause, the COLLSEQ compiler option indicates the collating sequence used. For example, if COLLSEQ(EBCDIC) is specified and the PROGRAM COLLATING SEQUENCE is not specified (or is NATIVE), the EBCDIC collating sequence is applied. (See Conditional expressions.)