Converting national to UTF-8 and UTF-8 to alphanumeric (DISPLAY-OF)

Use the DISPLAY-OF intrinsic function to convert national data to UTF-8, or to convert UTF-8 data to an alphanumeric (USAGE DISPLAY) character string that is represented in a code page that you specify as the second argument.

About this task

When you convert national data to UTF-8, it is necessary to specify the second argument of DISPLAY-OF, the output code page, to be code page 1208.

When you convert UTF-8 to alphanumeric, if you omit the second argument, the output code page is the one that was in effect with the CODEPAGE compiler option when the source was compiled. If you specify an EBCDIC or ASCII code page that combines single-byte character set (SBCS) and DBCS characters, the returned string might contain a mixture of SBCS and DBCS characters. The DBCS substrings are delimited by shift-in and shift-out characters if the code page in effect for the function is an EBCDIC code page.

Related references  
DISPLAY-OF (Enterprise COBOL for z/OS® Language Reference)