SQL/MX 3.2 Programming Manual for C and COBOL (H06.25+, J06.14+)

C/C++ Program Compilation
HP NonStop SQL/MX Release 3.2 Programming Manual for C and COBOL663854-002
15-75
Debugging a Program
Error 8400 The CLASS attribute of the DEFINE is not correct.
Error 8400 occurs if the Define =_MX_MODULE_SEARCH_PATH CLASS type is not
SEARCH DEFINE. This variable is used to locate and load the module file. Ensure that
Define =_MX_MODULE_SEARCH_PATH is specified correctly and restart the
embedded SQL program.
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:
Native Inspect. A system-level command-line symbolic debugger that can be used
to debug TNS/E native programs. For more information, see the Native Inspect
Manual.
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