SQL/MX Programming Manual for Java

Program and Module Management
HP NonStop SQL/MX Programming Manual for Java523726-003
6-13
How Modules Are Named
You specify these attributes externally on the SQLJ command line without changing
the MODULE directive in the source file. The SQLJ customizer applies the catalog and
schema and the target (or table set), version, and group attributes to the processed,
three-part module name to create an externally qualified module name. For more
information, see Options for Module Management on page 5-28 and Catalog and
Schema of the Module Name on page 4-13.
The externally qualified module name consists of the three-part module name plus the
module management attributes delimited by circumflex (^) characters:
CAT.SCH.GRP^MOD^TABLESET^VER
MYGROUP.MYUSER.GRP^MYPROG_SJPROFILE0^TABLESET^VER
The customizer embeds the externally qualified module name in the extended profile
and in the module definition. During SQL compilation, the SQL/MX compiler uses the
externally qualified module name in the module definition to name the module file.
During run time, the SQL/MX executor uses the externally qualified module name in
the extended profile to locate the associated module file and its compiled query
execution plan.
Externally qualified module names enable the coexistence of modules that use the
same three-part module names, provided that you use a different target or version
attribute during customization. For example:
CAT.SCH.^MOD^TABLESET1^VERSION1
CAT.SCH.^MOD^TABLESET2^VERSION1
CAT.SCH.^MOD^TABLESET2^VERSION2
You can also use the group attribute for coexistence, but that is not its main purpose.
For more information about the group attribute, see Grouping on page 6-20.
Module Name Length
Figure 6-4 shows the limits for module name length. In summary:
You are not required to choose identifiers that use the maximum length.
The maximum lengths are not additive.
The target (or table set), version, and group attributes are optional.