Using QMF

Calling REXX programs that contain substitution variables

If your REXX application contains a QMF RUN command with a substitution variable, you must start it using either CMS program_name or TSO program_name.

Whether you are running a procedure with logic or a callable interface program that is invoked by a procedure with logic, commands come into QMF the same way. In this context, the callable interface program becomes a logical extension of the procedure itself.

Consider the command:

RUN QUERY WEEKLY_Q (&DEPT=58

In a procedure with logic, use two ampersands on the substitution variable to pass the variable to the query:

"RUN QUERY WEEKLY_Q (&&DEPT=58"

If a substitution variable has only one ampersand, QMF resolves the variable for the procedure itself, and cannot pass the variable to the query.

If you call a REXX callable interface application from a procedure with logic, and that application contains the command RUN QUERY WEEKLY_Q (&DEPT=58, QMF resolves the variable just as it would for the calling procedure. Because the statement contains only one ampersand, the variable is not passed to the query.

To pass variables to QMF from a REXX callable interface application that is called by a procedure with logic, you have three choices:


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]