SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)

Managing Database Applications
HP NonStop SQL/MX Installation and Management Guide523723-004
11-16
Producing Locally Placed Modules or Globally
Placed Modules
Managing Module Files and Their Applications During Fallback From Release 2.1
or Release 2.0 on page 11-25
In previous releases of NonStop SQL/MX, all user modules were globally placed
modules located in the /usr/tandem/sqlmx/USERMODULES directory. For Release
2.0 and Release 2.1, applications written in C, C++, or COBOL can use either globally
placed modules or locally placed modules. NonStop SQL/MX does not support locally
placed modules for SQLJ applications.
A locally placed module can reside in any OSS directory other than the
/usr/tandem/sqlmx/USERMODULES directory and is co-located with its application
executable. The format and contents of locally placed modules are identical to globally
placed modules.
Producing Locally Placed Modules or Globally Placed Modules
You can specify that locally placed modules always be produced by setting the
MXCMP_PLACES_LOCAL_MODULES attribute ON in the SYSTEM_DEFAULTS
table. The system-defined default value for this attribute is OFF, which means that by
default all modules are globally placed in the /usr/tandem/sqlmx/USERMODULES
directory.
On a system where SQLJ programs and embedded SQL programs in C, C++, or
COBOL coexist and where the MXCMP_PLACES_LOCAL_MODULES attribute is ON
in the SYSTEM_DEFAULTS table, you should process SQLJ programs by using one of
these approaches:
SQL compile the SQLJ application in a separate step from translating and
customizing (the default mode in Release 2.1 or Release 2.0). Use the
-g moduleGlobal option when invoking mxCompileUserModule or mxcmp:
java sqlj.tools.Sqlj MyProg.sqlj
mxCompileUserModule -g moduleGlobal MyProg_SJProfile0.ser
When using the -createMDF or SQLMXCustomizerVersion=800 option on the
command line, SQL compile the SQLJ application in a separate step from
translating and customizing by specifying -sqlmx-compile=false:
java sqlj.tools.Sqlj -createMDF -sqlmx-compile=false
MyProg.sqlj
MxCompileUserModule -g moduleGlobal MyProg_SJProfile0.ser
For more information on processing SQLJ programs, see the SQL/MX Programming
Manual for Java.
On a case-by-case basis, you can specify local and globally placed modules with these
command-line options:
mxCompileUserModule
-g moduleGlobal | -g moduleLocal