SQL/MX 2.x Reference Manual (H06.04+)

Embedded-Only SQL/MX Statements
HP NonStop SQL/MX Reference Manual540440-003
3-69
MODULE Directive
MODULE Directive
The MODULE directive specifies the name of an embedded SQL/MX module for the C
or COBOL preprocessor. If you do not specify a MODULE directive, the preprocessor
generates a module name.
MODULE is an SQL/MX extension that you use only in embedded SQL programs.
module-name
is the name of the module. NonStop SQL/MX automatically qualifies a module
name with the current default catalog and schema names unless you explicitly
specify catalog and schema names with the module name. The module name is an
SQL identifier and must be unique among module names in the schema.
For a module name of catalog.schema.name, catalog, schema, and name
are SQL identifiers and therefore cannot consist of more than 128 characters. See
Identifiers on page 6-52.
NAMES ARE ISO88591
is an optional clause that specifies the character set for the module as ISO88591.
The ISO88591 character set is the default character set for CHAR or VARCHAR
data types for NonStop SQL/MX. The ISO 8859 character sets are a standard set
of nine single-byte character sets defined by ISO (International Organization for
Standardization) in a series called ISO 8859. The ISO88591 character set supports
English and other Western European languages.
Considerations for MODULE
Directive Used by the Preprocessor
The 3GL preprocessor creates a module definition file, containing only SQL
statements, as one of its two output files. The preprocessor writes the header of the
module definition file as:
MODULE module-name NAMES ARE ISO88591 ;
TIMESTAMP DEFINITION ( creation_timestamp ) ;
The preprocessor gets the module-name from the MODULE directive, if one exists, at
the beginning of your embedded SQL 3GL program.
MODULE module-name [NAMES ARE ISO88591]
Caution. Avoid using delimited identifiers that contain dots (.) and trailing spaces in the
names of the catalog, schema, and module. Dots and trailing spaces in delimited identifiers
might cause the three-part module name to clash with an unrelated module name, thus
overwriting the query execution plans of the other module.
C/COBOL