To specify national literals, use the prefix character N and compile with the option NSYMBOL(NATIONAL).
You can use either of these notations:
If you compile with the option NSYMBOL(DBCS), the literal prefix character N specifies a DBCS literal, not a national literal.
To specify a national literal as a hexadecimal value, use the prefix NX. You can use either of these notations:
Each of the following MOVE statements sets the national data item Y to the UTF-16 value of the characters 'AB':
01 Y pic NN usage national.
. . .
Move NX“00410042” to Y
Move N“AB” to Y
Move “AB” to Y
Do not use alphanumeric hexadecimal literals in contexts that call for national literals, because such usage is easily misunderstood. For example, the following statement also results in moving the UTF-16 characters 'AB' (not the hexadecimal bit pattern 4142) to Y, where Y is defined as USAGE NATIONAL:
Move X“4142” to Y
You cannot use national literals in the SPECIAL-NAMES paragraph or as program-names. You can use a national literal to name an object-oriented method in the METHOD-ID paragraph or to specify a method-name in an INVOKE statement.
Use the SOSI compiler option to control how shift-out and shift-in characters within a national literal are handled.
related tasks
Using literals
related references
NSYMBOL
SOSI
National literals
(COBOL for Windows Language Reference)