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


Using DBCS symbols as variable names or labels

z/OS TSO/E REXX Reference
SA32-0972-00

To enable the use of DBCS characters in variable names and labels, use the ETMODE option of the OPTIONS instruction. For more information, see OPTIONS.

The following are some ways that DBCS names can be used:
  • as variables or labels within your program
  • as constant symbols
  • as a STEM name on EXECIO or as a trapping variable for the OUTTRAP function
  • to pass parameters on the LINKPGM, ATTCHPGM, LINKMVS, LU62, CPICOMM, and APPCMVS host command environments
  • with functions like SYMBOL and DATATYPE
  • in arguments of functions (like LENGTH)
  • with the variable access routines IKJCT441 and IRXEXCOM.
The following example shows a program using a DBCS variable name and a DBCS subroutine label:
/* REXX */
OPTIONS 'ETMODE'            /* ETMODE to enable DBCS variable names */
MI<.X.E.D>=1                /* Set mixed DBCS variable name         */
<.S.Y.M.D> = 10             /* Variable with DBCS characters between
                               Shift-out (<) and Shift-in (>)       */
call <.D.B.C.S.R.T.N>       /* Call subroutine, with DBCS name      */
 ⋮
<.D.B.C.S.R.T.N>:           /* Subroutine with DBCS name            */
do i = 1 to 10
  if x.i = <.S.Y.M.D> then  /* Does x.i match the DBCS variable's
                               value?                               */
    say 'Value of the DBCS variable is: '<.S.Y.M.D>
 end
 exit 0

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014