Rational Developer for System z
Enterprise COBOL for z/OS, Version 4.1, Language Reference


CHAR

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.

Read syntax diagramSkip visual syntax diagram
Format

>>-FUNCTION CHAR--(--argument-1--)-----------------------------><

argument-1
Must be an integer. The value must be greater than zero and less than or equal to the number of positions in the collating sequence associated with alphanumeric data items (a maximum of 256).

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 single-byte EBCDIC collating sequence is used. (See Conditional expressions.)


Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)