SQLEXPLAIN [ ALLBASE/SQL Reference Manual ] MPE/iX 5.5 Documentation
ALLBASE/SQL Reference Manual
SQLEXPLAIN
The SQLEXPLAIN statement places a message describing the meaning of a
return code into a host variable. The text of messages comes from the
ALLBASE/SQL message catalog.
Scope
Application Programs Only
SQL Syntax
SQLEXPLAIN :HostVariable
Parameters
HostVariable identifies a host variable used to hold an
ALLBASE/SQL exception message. The message
describes the meaning of a return code.
ALLBASE/SQL puts a return code into the SQLCA
after each SQL statement in a program is
executed. The SQLCA is an area for information
on errors, warnings, truncation, null values, and
other conditions related to the execution of an
SQL statement.
Description
* This statement cannot be used interactively or in procedures.
* If more than one error occurs, SQLEXPLAIN can be used to obtain
more than one message. You execute SQLEXPLAIN repeatedly until
the SQLCODE field of the SQLCA data structure is equal to zero.
Refer to the ALLBASE/SQL application programming guide for the
language you are using for more information on status checking in
a program.
* The default ALLBASE/SQL message catalog is SQLCTxxx, which
contains preprocessor messages and ALLBASE/SQL error and warning
messages. The formal file designator for the message catalog is
SQLCTxxx.PUB.SYS
where xxx is the numerical value for the current language. If
this catalog cannot be opened, ALLBASE/SQL looks for the default
NATIVE-3000 message catalog:
SQLCT000.PUB.SYS
If this catalog is available, the user sees a warning message
indicating that the default catalog is being used. If the default
catalog cannot be opened, ALLBASE/SQL returns an error message
saying that the catalog file is not available.
Authorization
You do not need authorization to use SQLEXPLAIN.
Example
INCLUDE SQLCA
SQLStatement1
The host variable named :Message contains a message characterizing the
execution of SQLStatement1.
SQLEXPLAIN :Message
MPE/iX 5.5 Documentation