SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
COBOL Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
16-45
Displaying Query Execution Plans
This error can also occur if you make a copy of an application executable, rebuild the 
application (thus overwriting the original instance of the application’s module file), and 
then execute the first copy of the application. 
A common cause of error 8808 is reuse of code. If you have an embedded SQL source 
named myutils.ecob, you might build and link myutils with a number of 
applications. Each build (that is, preprocessing, COBOL-compilation and SQL 
compilation) of myutils results in a new copy of the same module file overwriting an 
earlier copy. Only the last application built with myutils.ecob avoids error 8808. 
To avoid error 8808:
•
If you want to reuse embedded modules, use either the grouping or versioning 
attributes described in Section 17, Program and Module Management. Qualifying 
your module name with a group or version attribute enables the separate builds of 
a module to coexist.
•
Build myutils.ecob only once, and then link the resulting myutils.o file to 
each application. 
When you need to rebuild myutils for each application, you can either edit the 
myutils.ecob source and change the name of the module that you give in the 
MODULE directive, or you can avoid the MODULE directive and let the 
preprocessor generate the module name.
Module File Naming
In application development, avoid the use of delimited identifiers that contain dots (.) in 
the name of a module’s catalog and schema and in the module name itself. Delimited 
identifiers begin and end with double quotation characters (""). However, quotation 
characters are removed when NonStop SQL/MX forms the three-part module name. In 
some cases of delimited identifiers that contain dots, the resulting three-part module 
name duplicates an unrelated module name, replacing the query execution plans of the 
other module file. For example, a module named "A.B".C.D (catalog "A.B", schema 
C, and module name D) creates a module file name of 
/usr/tandem/sqlmx/USERMODULES/A.B.C.D. A module named A."B.C".D 
(catalog A, schema "B.C", and module name D) creates an identically named module 
file. The second file overwrites the first, and the first module's application cannot 
execute. For more information on delimited identifiers, see the SQL/MX Reference 
Manual.
Displaying Query Execution Plans
The EXPLAIN function is an SQL/MX extension that generates a result table describing 
an access plan for a DML statement, otherwise known as a query execution plan. Use 
the EXPLAIN function for a DML statement in a module. For more information, see 
Displaying Query Execution Plans on page 15-60.










