Procedure syntax
You can find a summary of the syntax rules that are common to each command in this topic.
You can include comments in a procedure by entering two hyphens (--) on a line. All text that follows the hyphens through the end of the line is a comment and is not interpreted in the procedure.
You can use substitution variables to parameterize a
procedure. Each time that you run a procedure; it is scanned for substitution variables before it is
run. You must provide values for all substitution variables before the procedure is run. Values for
substitution variables can come from the RUN PROC
command, from global variables,
or by displaying the Enter Substitution Variable Values window.
Procedure parameters
Typically, each procedure parameter has the following syntax:<parameter_name>
= <parameter_value>
.RUN QUERY Q.STAFF (CONFIRM = NO ROWLIMIT=10 &&ID=10
RUN QUERY Q.STAFF (CONFIRM = NO, ROWLIMIT=10, &&ID=10
RUN QUERY Q.STAFF (CONFIRM=NO,ROWLIMIT=10,&&ID=10
If you want to use a parameter value, which contains commas
or spaces within, you must put the parameter in single ('parameter
value'
) or double quotation marks ("parameter value"
)
or put it in parentheses ((parameter value)
).
RUN QUERY Q.STAFF (&&NAME="MY NAME"
- In this procedure, the parameter value is processed as"MY NAME"
with double quotation marks.RUN QUERY Q.STAFF (&&NAME='MY NAME'
- In this procedure, the parameter value is processed as'MY NAME'
with single quotation marks.RUN QUERY Q.STAFF (&&NAME=(MY NAME)
- In this procedure, the parameter value is processed asMY NAME
without characters.