CHAR Function

The CHAR function returns a one-character alphanumeric value that is a character in the program collating sequence having the ordinal position that corresponds to the value of argument-1. The type of this function is alphanumeric.


FUNCTION CHAR (argument-1)


  1. argument-1 must be an integer.
  2. The value of argument-1 must be greater than zero and less than or equal to the number of positions in the collating sequence.

Returned Values

  1. 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.
  2. If the current program collating sequence was not specified by an ALPHABET clause, the value returned will be the character in the ASCII character set occupying the ordinal position of the argument.