SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
C/C++ Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
15-30
Compiling Embedded Module Definitions
module-name
is the fully qualified name of an embedded module definition. This option names
the generated module that is written to the user-specified local application directory
or to the global /usr/tandem/sqlmx/USERMODULES directory. For more
information, see Module Management Naming on page 17-8.
Each module-name consists of:
[[catalog.]schema.]module[MODULEGROUP=group]
[MODULETABLESET=target][MODULEVERSION=version]
If catalog and schema are omitted, their default value settings can be supplied
with -d MODULECATALOG=catalog or -d MODULESCHEMA=schema. If
MODULEGROUP, MODULETABLESET, or MODULEVERSION is omitted, the default
setting can be supplied with -d MODULEGROUP=group, -d
MODULETABLESET=target, or -d MODULEVERSION=version.
If no module name is specified, mxCompileUserModule operates on all
embedded module definitions of application-file. Otherwise, each module-
name is the fully qualified three-part name of an embedded module definition in
application-file, and mxCompileUserModule operates only on the named
embedded module definitions.
In summary, modules can be named as:
•
A fully qualified delimited module name, such as
cat.sch.\"GRP^MODULE^TGT^VER\"
•
A qualified module name followed by module specification strings, such as
cat.sch.module MODULEGROUP=grp MODULETABLESET=tgt
MODULEVERSION=ver
•
A simple, unqualified module name (for example, mod), with the catalog,
schema, group, table set, or version specified as -d compiler attributes
You can run mxCompileUserModule more than once.
mxCompileUserModule extracts the application-file’s selected module
definitions. For each selected module definition m, mxCompileUserModule passes m
to mxcmp for SQL compilation. Each compilation of a selected module definition either
succeeds or fails just like any mxcmp invocation. An mxcmp compilation failure does not
affect preceding or following mxcmp invocations. In particular, an mxcmp compilation
failure does not prevent mxCompileUserModule from proceeding with the mxcmp
compilation of the next selected module definition.
Examples—mxCompileUserModule
•
This command compiles the embedded module definition:
mxCompileUserModule sqlprog.exe