|
|
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.
Application Programs Only
SQLEXPLAIN :HostVariable
- 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.
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 fully qualified name for the default message catalog is as
follows:
For native language users, the following is the name of the catalog:
where $LANG is the current language.
If this catalog is not available, ALLBASE/SQL uses the default
catalog instead.
You do not need authorization to use SQLEXPLAIN.
INCLUDE SQLCA
SQLStatement1
The host variable named :Message contains a message characterizing the
execution of SQLStatement1.
SQLEXPLAIN :Message
|