Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

CHAR-NATIONAL - Character in the national collating sequence

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

  1. argument-1 must be an integer.

  2. The value of argument-1 must be greater than zero and less than or equal to 65536.

Returned values

  1. The return value supplied is the character whose ordinal position is determined in UTF-16 with argument-1.

  2. 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.