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

  1. Convert the item to UTF-16 in a national data item by using a MOVE statement or the NATIONAL-OF intrinsic function.
  2. Process the national data item as needed.
  3. Convert the result back to an alphanumeric data item by using the DISPLAY-OF intrinsic function.

Results