SQL/MP Programming Manual for COBOL85
Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for COBOL85—429326-004
6-32
Running the SQL Compiler in the Guardian
Environment
To support the COMPILE PROGRAM STORE SIMILARITY INFO, COMPILE
INVALID PLANS, or COMPILE INOPERABLE PLANS option, an SQL catalog must
have a catalog version of 310 (or later).
If you specify the COMPILE PROGRAM STORE SIMILARITY INFO, COMPILE
INVALID PLANS, or COMPILE INOPERABLE PLANS option (which stores
similarity information in the program file), the SQL compiler sets the program’s PFV
and PCV to 310. If you omit the COMPILE option or specify the COMPILE
PROGRAM option (the default), the SQL compiler sets the PCV to 1 (unless the
program includes other version 310 features).
PROGRAM [ STORE SIMILARITY INFO ]
directs the SQL compiler to explicitly compile all SQL statements in the
program. If you include the STORE SIMILARITY INFO clause, the SQL
compiler also stores similarity information for each SQL statement in the
program file.
CHECK PROGRAM is the default.
INVALID PLANS
directs the SQL compiler to explicitly compile these SQL statements:
•
Statements that reference changed DEFINEs.
•
Statements with plans that fail the redefinition timestamp check.
•
Statements with altered execution plans. An altered execution plan is an
invalid but operable plan that the SQL compiler has updated without
recompiling.
•
Uncompiled SQL statements with empty sections. The SQL compiler
generates an empty section if an SQL statement references a nonexistent
DEFINE or SQL object.
Other SQL statements retain their existing execution plans.
The COMPILE INVALID PLANS option stores similarity information in the
program file and updates the program’s usages in the USAGES tables.
If the program has not been previously compiled or if the program does not
contain similarity information, the COMPILE INVALID PLANS option directs the
SQL compiler to compile all SQL statements in the program.
INOPERABLE PLANS
directs the SQL compiler to explicitly compile these SQL statements:
•
Statements with inoperable plans (plans that fail the similarity check).
•
Uncompiled statements with empty sections. The SQL compiler generates
an empty section if an SQL statement references a nonexistent DEFINE or