SQL/MX Programming Manual for C and COBOL (G06.24+, H06.03+)
C/C++ Program Compilation
HP NonStop SQL/MX Programming Manual for C and COBOL—523627-004
15-60
Debugging a Program
•
Build myutils.sql 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.sql 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.
Debugging a Program
You can debug a C/C++ program and its corresponding SQL/MX module by using: 
•
Inspect: A symbolic interactive debugger that provides both machine-level and 
source-level debugging for TNS/R native programs. To run Inspect in the OSS 
environment, enter this command at the OSS prompt:
run -debug -inspect=on sqlprog.exe
where sqlprog.exe is the SQL/MX program you are debugging.
For detailed information, see the Inspect Manual.
•
Visual Inspect: A symbolic debugger that provides source-level debugging with a 
graphical user interface (GUI). Visual Inspect is a client-server application. The 
server component runs on an HP NonStop operating system, and the client 
component runs on a workstation in the Windows environment. Detailed 
documentation is available in the client component online help.
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 










