SQL/MX Programming Manual for C and COBOL (H06.04+)
C/C++ Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL—540434-001
15-33
Compiling a Module Definition File
-g moduleLocal[=OSSdir]
directs mxcmp to place the module into the named OSS directory. If the OSS
directory is omitted, the module is created in the current directory. The OSS
directory:
•
Must exist and be accessible. Otherwise, an error is returned, and no module
is created.
•
Must not specify a Guardian subvolume (/G/...) or a remote directory in an
Expand network (/E/...).
•
Must not exceed 1024 characters.
If you do not specify -g moduleLocal=OSSdir but set
MXCMP_PLACES_LOCAL_MODULES ON, you must be in the same directory as
the application executable when you invoke mxcmp. Otherwise, mxcmp writes the
module in the current directory, and you will need to move the module to the global
USERMODULES directory or co-locate the module with its application. For more
information, see Generating Locally or Globally Placed Modules on page 17-3.
-d compiler-attribute-name=compiler-attribute-value
specifies default attribute settings for compilation. The default attribute settings for
compilation override settings in the SYSTEM_DEFAULTS table but do not override
the object name qualification or the settings of embedded CONTROL QUERY
DEFAULT, DECLARE, or SET statements, which are in the input source file. For
more information, see the SYSTEM_DEFAULTS table in the SQL/MX Reference
Manual.
The OSS shell is used to invoke mxcmp. Consequently, you must adjust the syntax
for setting CONTROL QUERY DEFAULT attribute values for MP_SYSTEM and
MP_VOLUME. The OSS shell performs command/parameter substitution and
allows a \ (backslash) to quote special characters such as $.
This example shows how to set MP_SYSTEM and MP_VOLUME as mxcmp
command-line options:
to get MP_SYSTEM=\KINGPIN --> use -d MP_SYSTEM=\\KINGPIN
to get MP_VOLUME=$TX012 --> use -d MP_VOLUME=\$TX012
You must use a pair of backslashes when specifying the value for MP_SYSTEM
and one for MP_VOLUME.
module-definition-file
is the name of the input module definition file (.m) that was generated by the
C/C++ preprocessor (mxsqlc).
The static SQL/MX compiler provides backward compatible behavior. If the
SQLMX_PREPROCESSOR_VERSION environment variable is set to 800, mxcmp behaves
just like SQL/MX Release 1.8. Otherwise, mxcmp supports all SQL/MX Release 2.x










