SQL/MX 2.x Installation and Management Guide (H06.04+)

Managing Database Applications
HP NonStop SQL/MX Installation and Management Guide540436-001
11-25
Converting Globally Placed Modules to Locally
Placed Modules
2. Verify that the modules (or the application source files) have been backed up. This
gives you the option of restoring or rebuilding modules at a later time.
To remove a module from its directory, use the OSS rm command.
For example, to delete the globally placed module file cat.sch.globmod1 from the
/usr/tandem/sqlmx/USERMODULES directory, enter:
rm /usr/tandem/sqlmx/USERMODULES/CAT.SCH.GLOBMOD1
To delete the locally placed module file cat.sch.locmod1 from its local directory,
enter:
rm /usr/local01/CAT.SCH.LOCMOD1
In some cases, you might want to remove all modules of an application. For specific
details, see the grouping technique of module management naming in the SQL/MX
Programming Manual for C and COBOL. To delete all the module files of a group,
enter:
rm /usr/tandem/sqlmx/USERMODULES/*.*.MYGROUP^*
Consequences of Removing Module Files
If you try to run an application that refers to a deleted module, you might encounter
problems.
Deleted Modules of Embedded SQL Programs in C, C++, or COBOL
If you try to run an embedded SQL program in C, C++, or COBOL that refers to a
deleted module, NonStop SQL/MX returns an error message that indicates that the
module could not be opened because it no longer exists:
ERROR[8809] Unable to open the module file name
After removing modules of an embedded SQL program in C, C++, or COBOL, you
must again SQL compile (that is, run mxcmp or mxCompileUserModule) the
application’s modules. Otherwise, the next attempt to run the application causes Error
8809. For more information, see the SQL/MX Programming Manual for C and COBOL
and the SQL/MX Messages Manual.
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-26