Procedure syntax

You can find a summary of the syntax rules that are common to each command in this topic.

Typically, each line of a procedure contains a single command. However, you can spread a command over multiple lines by placing a plus sign (+) as a continuation character in the first column of each additional line.

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>.
The procedure parameters must be separated by commas or spaces. See the following commands that are identical:

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)).

Note: If you put the parameter value in single or double quotation marks, these marks are included in the parameter value. If you do not need quotation marks in the parameter value, put it in parentheses.
The following commands have different syntax in parameter values, and they are processed differently by the application:
  • 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 as MY NAME without characters.