SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
Program and Module Management
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
17-9
How Modules Are Named
How Modules Are Named
The SQL preprocessor generates a three-part module name based on the MODULE
directive that you specify in the C, C++, or COBOL source file. For more information,
see Section 15, C/C++ Program Compilation and Section 16, COBOL Program
Compilation. The three parts of the module name are the catalog, schema, and module
names, separated by periods. For example:
CAT.SCH.MOD
If the C, C++, or COBOL source file does not contain a MODULE directive, the SQL
preprocessor generates a synthetic three-part module name. If a default catalog exists,
the preprocessor uses the default catalog name. If no default catalog exists, the
Windows-hosted preprocessor uses the synthetic SQLMX_DEFAULT_CATALOG_
name and the NSK-hosted SQL preprocessor uses your Guardian group name. If a
default schema exists, the preprocessor uses the default schema name. If no default
schema exists, the Windows-hosted preprocessor uses the synthetic
SQLMX_DEFAULT_SCHEMA name and the NSK-hosted preprocessor uses your
Guardian group name. If no MODULE directive exists in the source file, the SQL
preprocessor introduces a synthetic module name of the form
SQLMX_DEFAULT_MODULE_timestamp.
In this example, a default catalog and schema are in effect, but no module directive
exists:
CAT.SCH.SQLMX_DEFAULT_MODULE_21194398887224944
In this example, no default catalog or schema are in effect, however, a module
directive exists:
SQLMX_DEFAULT_CATALOG_.SQLMX_DEFAULT_SCHEMA_.TESTA193M (on PC)
GROUP.USER.TESTA193M (on NSK)
In this example, no default catalog or schema are in effect and no module directive
exists.
SQLMX_DEFAULT_CATALOG_.SQLMX_DEFAULT_SCHEMA_.SQLMX_DEFAULT_MODUL
E_2119439730011160670 (on PC)
GROUP.USER.SQLMX_DEFAULT_MODULE_2119439730011160670 (on NSK)
In addition to the three-part module name determined by the MODULE directive or by
the system, you can pass these optional module management attributes to the SQL
preprocessor:
•
Catalog
•
Schema
•
Target or table set
•
Version
•
Group
You specify these attributes with the preprocessor option -g and without changing the
MODULE directive in the source file. The preprocessor applies the catalog and