Processing alphanumeric data items that contain DBCS data
If you use byte-oriented
operations (for example, STRING
, UNSTRING
,
or reference modification) on an alphanumeric data item that contains
DBCS characters, results are unpredictable. You should instead convert
the item to a national data item before you process it.
About this task
That is, do these steps:
Procedure
- Convert the item to UTF-16 in a national data item
by using
a
MOVE
statement or theNATIONAL-OF
intrinsic function. - Process the national data item as needed.
- Convert the result back to
an alphanumeric data item by
using the
DISPLAY-OF
intrinsic function.
Results