ALLBASE/SQL Reference Manual (36216-90216)

550 Chapter12
SQL Statements S - Z
SQLEXPLAIN
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 fully qualified name for the default message catalog is as follows:
/usr/lib/nls/n-computer/hpsqlcat
For native language users, the following is the name of the catalog:
/usr/lib/nls/$LANG/hpsqlcat
where $LANG is the current language.
If this catalog is not available, ALLBASE/SQL uses the default catalog instead.
Authorization
You do not need authorization to use SQLEXPLAIN.