SQL/MP Programming Manual for COBOL

Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for COBOL—529758-003
6-33
Running the SQL Compiler in the Guardian
Environment
OFF
directs the SQL compiler to explicitly SQL compile the program and perform all
SQL compiler functions.
OFF is the default.
NOREGISTER
directs the SQL compiler to compile a program without registering the program in a
catalog. To use the NOREGISTER option, you must have an SQL/MP software
version of 310 (or later).
ON
directs the SQL compiler to explicitly compile the program but not to register it
in a catalog. The SQL compiler does not mark the program as SQL sensitive
and SQL valid in its file label. Therefore, the program file can be executed
without being registered in an SQL catalog. If you specify the CATALOG option
with the NOREGISTER ON option, the compilation fails with SQL error 2116. If
the program is already registered in a catalog, the compilation fails with SQL
error 2110. If the program was modified by the Binder program or linker after it
was SQL compiled, the operation fails with SQL error 2103.
OFF
directs the SQL compiler to explicitly compile the program and perform all
specified compiler functions, including registering the program in the catalog.
OFF is the default.
CHECK
determines the behavior of the SQL executor when it executes an invalid SQL
statement or a statement that references a DEFINE that has changed since the
last explicit SQL compilation. To use a CHECK option, you must have an SQL/MP
software version of 310 (or later).
If you specify the CHECK INVALID PLANS or CHECK INOPERABLE PLANS
option (which stores similarity information in the program file), the SQL compiler
sets the program’s PFV and PCV to 310 (or later). To support these options, an
SQL catalog must have a catalog version of 310 (or later).
If you restore a program using the SQLCOMPILE option, the RESTORE program
invokes the recompilation of the program by using the SQLCOMP CHECK option
specified during the last explicit SQL compilation.
INVALID PROGRAM
specifies that the SQL executor should automatically recompile all SQL
statements in an invalid program or a program that references changed