SQL/MP Programming Manual for COBOL

Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for COBOL529758-003
6-27
SQL Compiler Functions
SQL Compiler Functions
Resolves names and expands SQL object names, including DEFINE names, using
the current default volume and the current catalog, and then stores the DEFINE
names in the SQL object file.
Performs type checking for COBOL and SQL data types.
Expands views.
Checks object references in catalogs for SQL object names to verify their
existence and to read their descriptions, and then evaluates the object type and
characteristics for each reference.
Determines an optimized execution plan by analyzing SELECT, INSERT, UPDATE,
and DELETE statements to determine the best access paths and join, sort, and
blocking strategies. Estimates the execution costs for DML statements based on
the statistics in the catalogs.
Generates executable code for the execution plans.
Registers the program in the specified PROGRAMS table and stores any
dependencies for tables, views, collations, and indexes in the USAGES table for
each table, view, or index that is accessed.
For example, if a program refers to a collation, SQLCOMP generates a row in the
USAGES table showing that the program depends on the collation and sets
USAGES.USEDOBJTYPE to CP.
Generates a listing of the SQL statements in the program file, including warning or
error messages that occur.
Sets the SQL SENSITIVE and SQL VALID flags in the program file label if the
compilation is successful.