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

Managing Database Applications
HP NonStop SQL/MX Installation and Management Guide544536-007
11-28
Converting Globally Placed Modules to Locally
Placed Modules
Converting Globally Placed Modules to Locally Placed Modules
You might mix globally placed modules and locally placed modules in a development
environment. However, in a production environment, you should choose globally
placed modules or locally placed modules and not mix the two. For information about
managing the coexistence of globally placed modules and locally placed modules in
the same environment, see the SQL/MX Programming Manual for C and COBOL.
You can convert applications that use globally placed modules to those that use locally
placed modules in these environments:
Converting Applications in a Development Environment on page 11-28
Converting Applications in a Production Environment on page 11-28
Converting Applications in a Development Environment
To build the application in a development environment as if it were a new version of the
application:
1. Before you create new locally placed modules, set the
MXCMP_PLACES_LOCAL_MODULES attribute ON in the SYSTEM_DEFAULTS
table. Consequently, if you do not specify the -g moduleLocal command-line
option in mxCompileUserModule or mxcmp, a locally placed module is created
by default.
2. Change all build scripts for the application being converted so that the current
directory is the directory where the application executables exist. Alternately,
change the build scripts so that the SQL compilation step (mxcmp or
MxCompileUserModule) uses the -g moduleLocal command-line option.
3. Rebuild and test the application as you would any new version of an application.
4. When you deploy the application in the production environment, copy any
compilation scripts that replace the previous compilation scripts.
5. If you recompile the modules in the production environment, change the
compilation script so that it is consistent with the changes made in Step 2.
6. Remove the shared global copies of the now unused modules from the
/usr/tandem/sqlmx/USERMODULES directory.
7. Start the new version of the application.
Converting Applications in a Production Environment
On a production system, convert applications that use globally placed modules to
those that use locally placed modules:
1. If you know which modules are used by programs that make up an application,
skip this step. Otherwise, use the mxCompileUserModule utility to determine
which modules are used by the programs that make up an application.