The RUN command executes procedures or queries from temporary storage or from the database.
To run a target object from the database:
>>-- RUN ------------- ObjectName --------------------------------<< +- QUERY -+ +- ( --- &&Variable = Value ----+ +- CONFIRM = YES/NO ------+ +- FORM = --- FORM -------+ | +- FormName -+ | +- ROWLIMIT = NumRows-----+ >>-- RUN ------------ ObjectName ---------------------------------<< +- PROC -+ +- ( &&Variable = Value ... -+
To run a temporary target object:
>>-- RUN QUERY ---------------------------------------------------<< +- ( --- &&Variable = Value ----+ +- CONFIRM = YES/NO ------+ +- FORM = --- FORM -------+ | +- FormName -+ | +- ROWLIMIT = NumRows/NO -+ >>-- RUN PROC ----------------------------------------------------<< +- ( &&Variable = Value ... -+
Parameter | Description |
---|---|
ObjectName | The name of the query or procedure to run. |
&&Variable | Assigns a value to a variable in the query or
procedure that is being run. The variable name can be from 1 to
17 characters long and the value can be from 1 to 55 characters
long. You can specify any number of variables and values on the RUN command.
You will be prompted to provide values for each variable in the query or procedure if you did not provide values on the RUN command, and the variable was not a global variable. Once a global variable is set, the variable can be used for an entire QMF for Windows session. A global variable can be used in a query, form, or procedure. When you include variable assignments in a procedure, you must use two ampersands (&&) to prevent variable substitution before the procedure is run. |
CONFIRM | Specifies whether or not to display a confirmation dialog before replacing or changing an object as a result of this command. If CONFIRM is not specified or is set to NO, the corresponding resource limit is used. |
FORM | Specifies a form to use when generating a displayed report using the data retrieved by the query. You can specify the keyword FORM to use the current form object, or specify the name of a form saved in the database. |
ROWLIMIT | Specifies the maximum number of rows to retrieve for the query. |
RUNQUERY USER1.QUERY1 (&&Var1=10