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-5
Managing the Coexistence of Globally and Locally
Placed Modules
module in the current directory, and you will need to manually move the module to co-
locate it with its application. 
To generate globally placed modules in the /usr/tandem/sqlmx/USERMODULES 
directory on a case-by-case basis, use the -g moduleGlobal option, as shown next:
mxCompileUserModule -g moduleGlobal app.exe
For more information, see Compiling Embedded Module Definitions on page 15-27 and 
16-22. 
System-Wide Setting for Globally Placed Modules
By default, the mxCompileUserModule and mxcmp commands automatically place 
globally placed modules in the /usr/tandem/sqlmx/USERMODULES directory. 
To generate locally placed modules on a case-by-case basis with 
mxCompileUserModule, use the -g moduleLocal option, as shown next:
mxCompileUserModule -g moduleLocal dir/app.exe 
To generate locally placed modules on a case-by-case basis with mxcmp, use the -g 
moduleLocal=OSSdir option, replacing OSSdir with the name of the application 
directory:
mxcmp -g moduleLocal=OSSdir sqlprog.m 
For more information, see Compiling Embedded Module Definitions on page 15-27 and 
16-22 and Compiling a Module Definition File on page 15-31 and 16-26. 
Considerations for Co-Locating Locally Placed Modules
Two methods exist for creating locally placed modules. You can set the 
MXCMP_PLACES_LOCAL_MODULES attribute ON in the SYSTEM_DEFAULTS 
table to specify that locally placed modules always be created. You can generate 
locally placed modules on a case-by-case basis with the -g moduleLocal options for 
mxcmp and mxCompileUserModule. Consider these issues when co-locating locally 
placed modules:
•
Invoking mxCompileUserModule dir/app.exe is not the same as invoking 
mxCompileUserModule -g moduleLocal dir/app.exe. 
The directory path in mxCompileUserModule dir/app.exe merely states where 
the application is located. If you have not set the 
MXCMP_PLACES_LOCAL_MODULES attribute ON in the SYSTEM_DEFAULTS 
table, the module is globally placed in the /usr/tandem/sqlmx/USERMODULES 
directory. If you have set the MXCMP_PLACES_LOCAL_MODULES attribute ON 
in the SYSTEM_DEFAULTS table, the module is placed in the current directory 
where mxcmp or mxCompileUserModule is invoked. To co-locate the module 
with the application, ensure that you are in the proper directory before you invoke 
mxcmp or mxCompileUserModule.










