You can use double-byte character set (DBCS) names in your REXX programs for literal strings, symbols, and comments. Such character strings can be single-byte, double-byte, or a combination of both. To use DBCS names, OPTIONS ETMODE must be the first instruction in the program. This specifies that the language processor should check strings containing DBCS characters for validity. You must enclose DBCS characters within shift-out (SO) and shift-in (SI) delimiters. (The SO character is X'0E', and the SI character is X'0F') The SO and SI characters are non-printable. In the following example, the less than (<) and greater than (>) symbols represent shift-out (SO) and shift-in (SI), respectively. For example, <.S.Y.M.D> and <.D.B.C.S.R.T.N> represent DBCS symbols in the following example.
The following is an example of a program using a DBCS variable name and a DBCS subroutine label.
/* REXX */
OPTIONS 'ETMODE' /* ETMODE to enable DBCS variable names */
<.S.Y.M.D> = 10 /* Variable with DBCS characters between */
/* shift-out (<) and shift-in (>) */
y.<.S.Y.M.D> = JUNK
CALL <.D.B.C.S.R.T.N> /* Call subroutine with DBCS name */
EXIT
<.D.B.C.S.R.T.N>: /* Subroutine with DBCS name */
DO i = 1 TO 10
IF y.i = JUNK THEN /* Does y.i match the DBCS variable's
value? */
SAY 'Value of the DBCS variable is : ' <.S.Y.M.D>
END
RETURN