Passing values to a procedure with logic
For procedures with logic, use the ARG option on the RUN PROC command to pass arguments, or values, to a procedure with logic. You can also use the ARG option to pass values between procedures.
Use the ARG option when you are running a procedure that contains a REXX PARSE ARG statement or ARG statement, as in the following figure.
RUN PROC SHOW_ARGS (ARG=(query_name form_name)
In this command, query_name and form_name are REXX variable names that describe the parameters being passed to the procedure with logic; they contain the object names for a query and a form, respectively. Using these variable names allows you to reference the parameters that were passed to the procedure with logic.