Loading...
Select Version
The CHAR-NATIONAL function returns the character whose ordinal position is determined within the national collating sequence using argument-1.
The type of this function is national.
Format
FUNCTION CHAR-NATIONAL (argument-1)
Arguments
argument-1 must be an integer.
The value of argument-1 must be greater than zero and less than or equal to 65536.
Returned values
The return value supplied is the character whose ordinal position is determined in UTF-16 with argument-1.
The error default value is a space.
See also: ORD
Example 9-7
...
DATA DIVISION.
WORKING-STORAGE SECTION.
01 LETTER PIC 999 VALUE 64.
01 R PIC N.
PROCEDURE DIVISION.
MAIN.
MOVE FUNCTION CHAR-NATIONAL (LETTER) TO R.
STOP RUN.
Result: R contains the character N“@" in UTF-16 representation.