SQL Programming Manual for TAL
Program Compilation and Execution
HP NonStop SQL Programming Manual for TAL—527887-001
5-30
Skipping Unavailable Partitions
Skipping Unavailable Partitions
Use the SKIP UNAVAILABLE PARTITION option of the CONTROL TABLE directive to
cause NonStop SQL to skip a partition that is not available and to open the next
available partition that satisfies the search condition of a query. (NonStop SQL also
returns a warning message (8239) to the SQLCA.) The SKIP UNAVAILABLE
PARTITION option applies to static or dynamic SQL statements that refer to partitioned
tables and partitioned indexes of the tables.
Executing an SQL Program File
You execute an SQL program file as you would any program file by using the TACL
RUN (or RUND) command or a process-creation system procedure such as
NEWPROCESS. This subsection describes how to execute a program file from your
TACL process; for information about executing a program file using a system
procedure, see the
Guardian Procedure Calls Reference Manual.
Before running the program file, you can specify TACL DEFINE, PARAM, and ASSIGN
commands for run-time parameters and control. For more information about these
commands, see the
TACL Reference Manual.
NonStop SQL returns any run-time errors and warnings to the SQLCODE variable and
the SQL communications area (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