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-10
How Modules Are Named
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.
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
The preprocessor embeds the externally qualified module name 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 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 preprocessing. 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 on the group attribute, see Grouping on page 17-21.
For information on the exact -g syntax for your development environment and
application language, see:
•
Syntax for the OSS-Hosted SQL/MX C/C++ Preprocessor on page 15-16
•
Syntax for the Windows-Hosted SQL/MX C/C++ Preprocessor on page 15-21
•
Syntax for the OSS-Hosted SQL/MX COBOL Preprocessor on page 16-13
•
Syntax for the Windows-Hosted SQL/MX COBOL Preprocessor on page 16-17
Module Name Length
Figure 17-1 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.
Note. To fully understand the effects of using or not using each of the module
management attributes, see Table 17-3
on page 17-12.