SQL/MX 2.x Installation and Management Guide (G06.24+, H06.03+)
Managing Database Applications
HP NonStop SQL/MX Installation and Management Guide—523723-004
11-23
Converting Globally Placed Modules to Locally
Placed Modules
8809. For more information, see the SQL/MX Programming Manual for C and COBOL
and the SQL/MX Messages Manual.
Deleted Modules of SQLJ Programs
If you try to run an SQLJ program that refers to a deleted module, the SQLJ run time
either returns an SQL exception or dynamically executes the SQL statements in the
program, depending on the setting of the -missingSQLObject command-line option
during customization. For more information, see the causes of dynamic execution in
the SQL/MX Programming Manual for Java.
After removing modules of an SQLJ program, run the SQLJ customizer with the
-uninstall command-line option to remove all references to the deleted module
from the extended profile. For example:
java sqlj.tools.Sqlj -uninstall=true myProg_SJProfile1.ser
For more information on this SQLJ command-line option, see the SQL/MX
Programming Manual for Java.
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-23
•
Converting Applications in a Production Environment on page 11-24
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.