z/OS TSO/E CLISTs
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Converting EBCDIC data to DBCS - &SYSTWOBYTE

z/OS TSO/E CLISTs
SA32-0978-00

Use the &SYSTWOBYTE built-in function to convert EBCDIC characters to the double-byte character set (DBCS). The EBCDIC characters that can be converted are those with the hexadecimal equivalents X'40' and in the range from X'41' to X'FE'. Any other EBCDIC characters cause errors when used with &SYSTWOBYTE.

&SYSTWOBYTE converts the EBCDIC characters to DBCS by prefixing them with the value X'42'. In the case of the EBCDIC blank (X'40'), &SYSTWOBYTE prefixes it with the value X'40' to create the DBCS blank.

&SYSTWOBYTE encloses the resulting DBCS strings in DBCS delimiters (X'0E' and X'0F').

The following example represents a complete conversion from EBCDIC to DBCS:
SET X = &SYSTWOBYTE(ABCD)         /* result: X = <dAdBdCdD>
The following example represents a partial conversion from EBCDIC to DBCS:
SET X = &SYSTWOBYTE(CD<d5d6>EF)   /* result: X = <dCdDd5d6dEdF>

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014