The CURRENT EXPLAIN MODE special register holds a CHAR(8) value which controls the behaviour of the Explain facility with respect to eligible dynamic SQL statements. This facility generates and inserts Explain information into the Explain tables (for more information see the Administration Guide). This information does not include the Explain snapshot.
The possible values are YES, NO, and EXPLAIN. (17)
The initial value is NO.
Its value can be changed by the SET CURRENT EXPLAIN MODE statement (see SET CURRENT EXPLAIN MODE for information on this statement).
The CURRENT EXPLAIN MODE and CURRENT EXPLAIN SNAPSHOT special register values interact when the Explain facility is invoked (see Table 108 for details). The CURRENT EXPLAIN MODE special register also interacts with the EXPLAIN bind option (see Table 109 for details).
Example: Set the host variable EXPL_MODE (char(8)) to the value currently in the CURRENT EXPLAIN MODE special register.
VALUES CURRENT EXPLAIN MODE INTO :EXPL_MODE
(17) For static SQL, the EXPLAIN bind option provides the same control. In the case of the PREP and BIND commands, the EXPLAIN option values are: YES, NO and ALL.