SQL/MX 3.2 Programming Manual for C and COBOL (H06.25+, J06.14+)
Program and Module Management
HP NonStop SQL/MX Release 3.2 Programming Manual for C and COBOL—663854-002
17-6
Generating modules in a user-specified location
The directory path in mxCompileUserModule -g moduleLocal dir/app.exe
states both where the application is located and where to co-locate the module
with the application. You can invoke mxcmp or mxCompileUserModule with the
-g moduleLocal option from any OSS directory and automatically co-locate the
module with the application.
Set the MXCMP_PLACES_LOCAL_MODULES attribute only in the
SYSTEM_DEFAULTS table.
The MXCMP_PLACES_LOCAL_MODULES attribute in the SYSTEM_DEFAULTS
table establishes a system-wide policy. Avoid these ways of setting
MXCMP_PLACES_LOCAL_MODULES:
In an embedded CONTROL QUERY DEFAULT statement in an application
With the -d option in mxcmp or mxCompileUserModule
The syntax for these methods is valid but could be complicated and problematic.
For example, this command places the module in the current directory where you
invoke mxCompileUserModule instead of in the same directory as the
application executable:
mxCompileUserModule -d MXCMP_PLACES_LOCAL_MODULES=ON
dir/app.exe
Instead, you can more easily invoke this command from any OSS directory to co-
locate the module with the application:
mxCompileUserModule -g moduleLocal dir/app.exe
Embedding a static CONTROL QUERY DEFAULT statement with
MXCMP_PLACES_LOCAL_MODULES ‘ON’ directs the SQL/MX compiler to
generate a locally placed module for the application in the OSS directory where
you invoke mxCompileUserModule or mxcmp. Embedding a dynamic CONTROL
QUERY DEFAULT statement with MXCMP_PLACES_LOCAL_MODULES ‘ON’
directs any SQL/MX compiler process spawned by the application to generate
locally placed modules in the current directory.
Therefore, for the best results, set the MXCMP_PLACES_LOCAL_MODULES
attribute in the SYSTEM_DEFAULTS table or set locally or globally placed modules
on a case-by-case basis with the -g moduleLocal or -g moduleGlobal
options of mxcmp and mxCompileUserModule.
Generating modules in a user-specified
location
You can generate modules in any user-specified Guardian or OSS location, including
local, global, and application DLL locations.
Depending on the requirement, you can specify the user-specified, locally, and globally
placed modules with the following command-line options:










