Table 10 shows the differences between REXX variables and
substitution variables. It also shows how each is used in a procedure
with logic.
Table 10. REXX variables versus substitution variables in a procedure with logic
REXX variables | Substitution variables |
---|---|
Name is made up of alphanumeric characters in lowercase or
uppercase.
what_2_do | Name must begin with an ampersand (&), followed by alphanumeric and
special characters
&DEPARTMENT |
Can be used in REXX statements:
if progname = '' then | Can be used in QMF commands:
"RUN QUERY MYQUERY (FORM = &FORMNAME" |
Can be given a value on the RUN PROC command using the QMF ARG parameter
and the REXX ARG parameter:
RUN PROC MYPROC (ARG=MONDAY arg whichday | Can be given a value on the RUN PROC command:
"RUN PROC MYPROC (&&FORMNAME = MYFORM" |
Can be given a value using a QMF global variable and the QMF GET GLOBAL
command:
"GET GLOBAL (WHO_IS_IT = DSQAO_CONNECT_ID" | Automatically assigned a value by QMF at the time the command is run if a global variable by that name has been set (if the substitution variable has not already been given a value). |
Can be used to set a global variable value using the QMF SET GLOBAL
command:
"SET GLOBAL (JOBTYPE =" JOBVAR | Cannot be used to set a global variable value. |