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-27
Removing Modules
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. 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.