The ONEBYTE and TWOBYTE built-in functions
The ONEBYTE function is used to convert a variable from a 1-byte character code to the corresponding 1-byte code without changing the value of the variable. The TWOBYTE function is used to convert a variable from a 1-byte character code to the corresponding 2-byte code without changing the value of the variable.
- variable name
- Name of the variable the function will process.
&VARA = ONEBYTE(&VARB)
&VARA = TWOBYTE(&VARB)The variable being converted must not contain mixed (DBCS/EBCDIC) data. Only variables, not literals, can be converted. An odd input value length is permitted for the TWOBYTE function, but is not permitted for the ONEBYTE function. The input value length does not include trailing blanks or nulls. Literals cannot be used as input parameters for either function. Nested built-in functions are not allowed on the TWOBYTE function. The ONEBYTE function allows nesting of the DELSOSI built-in function.
&VARB = ONEBYTE(DELSOSI(&VARA))