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-22
Removing Modules
are not found in the local directory, an error is returned and searching does not extend
beyond the local directory.
For more information about the syntax of the MODULE_DIR clause of DISPLAY USE
OF, see the SQL/MX Reference Manual.
Removing Modules
You should prepare carefully before you remove module files. At best, removing a
module file can free up disk space. At worst, it can cause some of their applications to
return run-time errors (8809, unable to open module file).
Before you remove a module file:
1. Verify that no other applications use modules that you will remove.
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 and the SQL/MX Programming Manual for
Java. 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