SQL/MX 3.2.1 Programming Manual for C and COBOL (H06.26+, J06.15+)
Program and Module Management
HP NonStop SQL/MX Release 3.2.1 Programming Manual for C and COBOL—663854-005
17-10
How Modules Are Named
To accomplish these tasks, you need not change the C, C++, or COBOL source file or
rely strictly on the MODULE directive or on module naming defaults. Instead, you can
specify the catalog and schema and the target, version, and group attributes for the
module names during SQL preprocessing. The external naming of the module files
during preprocessing influences the targeting, versioning, and grouping properties of
an application.
For more information, see:
How Modules Are Named on page 17-10
Effect of Module Management Naming on page 17-13
Specifying the search locations of the module files on page 17-13
Versioning on page 17-21
Grouping on page 17-23
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)










