SQL Programming Manual for Pascal

Program Compilation and Execution
HP NonStop SQL Programming Manual for Pascal528614-001
5-30
Using the RUN Command
from your TACL process; for information about executing a program file using system
procedures, see the System Procedure Calls Reference Manual.
Before running the program file, you can specify DEFINE, PARAM, and ASSIGN
commands for run-time parameters and control. For information about these
commands, see the TACL Reference Manual.
NonStop SQL returns any run-time errors and warnings to the SQLCODE variable and
the SQLCA if it is declared. For information about error processing, see Section 6,
Error and Status Processing. For a list of errors and warnings, see the SQL/MP
Messages Manual.
For an SQL program file to execute, the file must be:
Validated by the SQL compiler for execution
Recorded in a PROGRAMS catalog table
To execute an SQL program file, you (or your application process if you use a process-
creation system procedure) must have access authority as follows:
Read and execute authority to the program file
Read authority to the catalog in which the program is registered
Read authority to any catalog in which tables or views used by the program are
registered for SQL statements requiring automatic recompilation
Using the RUN Command
To execute an SQL program file from your TACL process, use the TACL RUN
command. You can enter a RUN command either explicitly or implicitly. For an explicit
RUN command, enter the keyword RUN (or RUND) followed by the program file. For
an implicit RUN command, enter only the name of the program file. The syntax for the
RUN command is:
RUN
executes the program file without debugging.
RUND
executes the program file and initiates debugging under the control of Inspect or
DEBUG.
program-file
is the name of the SQL program file.
[ RUN[D] ] program-file
[ / run-option [ , run-option ] ... / ] [ param-set ]