SQL/MP Programming Manual for COBOL85
Explicit Program Compilation
HP NonStop SQL/MP Programming Manual for COBOL85—429326-004
6-39
Using the EXPLAIN Utility
EXPLAIN DEFINES Report
The EXPLAIN DEFINES report shows the mapping of DEFINE names used in SQL 
statements with this information: 
•
The default volume and catalog used by the program (obtained from the 
=_DEFAULTS DEFINE) 
•
Each DEFINE name and its associated Guardian name
The EXPLAIN utility can generate the EXPLAIN DEFINES report in either of these 
formats: 
Following is an example of the OBEY command file format report. In an actual report, 
each instance of subvolume-name, guardian-name, and DEFINE-name would be 
replaced by the actual name.
ALTER DEFINE =_DEFAULTS, VOLUME subvolume-name
ALTER DEFINE =_DEFAULTS, CATALOG subvolume-name
ADD DEFINE define-name, FILE guardian-name
ADD DEFINE define-name, FILE guardian-name
...
When you issue an OBEY command to execute the file shown previously, ensure that 
the DEFINE mode (DEFMODE) is ON and the DEFINE CLASS is MAP. 
The INFO DEFINE format uses the same format as the INFO DEFINE command. 
Following is an example of an INFO DEFINE format report. In an actual report, each 
guardian-name and define-name would be replaced by the actual name.
DEFINE NAME =_DEFAULTS
CLASS DEFAULTS
VOLUME guardian-name
CATALOG guardian-name
DEFINE NAME define-name
CLASS MAP
FILE guardian-name
DEFINE NAME define-name
CLASS MAP
FILE guardian-name
... ...
In the next example, the SQL compiler writes an execution plan and DEFINEs to the 
spooler location $S.#EXPLAIN. The OBEYFORM option causes the compiler to write 
the DEFINEs in obey-file format to the file named SETDEFS for subsequent execution. 
OBEY command file 
format
EXPLAIN generates the ADD DEFINE commands that add 
the DEFINEs. You can then use a TACL OBEY command to 
execute these commands. 
INFO DEFINE format EXPLAIN generates a report in the format used by the 
TACL INFO DEFINE command. 










