You can use a MOVE statement to implicitly convert data to national representation.
You can move the following kinds of data to category national or national-edited data items, and thus convert the data to national representation:
You can likewise move the following kinds of data to numeric-edited data items that have USAGE NATIONAL:
For complete rules about moves to national data, see the related reference about the MOVE statement.
For example, the MOVE statement below moves the alphanumeric literal “AB” to the national data item UTF16-Data:
01 UTF16-Data Pic N(2) Usage National.
. . .
Move “AB” to UTF16-Data
After the MOVE statement above, UTF16-Data contains NX'00410042', the national representation of the alphanumeric characters 'AB'.
If padding is required in a receiving data item that has USAGE NATIONAL, the default UTF-16 space character (NX'0020') is used. If truncation is required, it occurs at the boundary of a national-character position.
related tasks
Assigning values to elementary data items (MOVE)
Assigning values to group data items (MOVE)
Displaying numeric data
Coding for use of DBCS support
related references
MOVE statement
(COBOL for Windows Language Reference)