The SQLEXPLAIN Command [ HP ALLBASE/4GL Developer Reference Manual Vol. 1 ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Reference Manual Vol. 1
The SQLEXPLAIN Command
HP ALLBASE/4GL requires a slightly modified form of the SQLEXPLAIN
command in SQL logic blocks. The SQLEXPLAIN command allows you to
retrieve the text of HP ALLBASE/SQL error messages into the communication
area field *ERROR. The format for the SQLEXPLAIN command is simply
SQLEXPLAIN;
You cannot use a host variable reference with the SQLEXPLAIN command in
an SQL logic block.
When HP ALLBASE/SQL detects an error at run-time, HP ALLBASE/4GL executes
one SQLEXPLAIN command automatically. This command retrieves the text of
the error message into *ERROR, and the error number, plus 100000, into
the communication area field *IOSTATUS.
In some cases, a single SQL statement can cause multiple SQL error
messages. You can use further SQLEXPLAIN commands to retrieve the text
and number of subsequent error messages. After the last error message
has been retrieved, a further SQLEXPLAIN command returns an empty string
to *ERROR and sets *IOSTATUS to zero.
MPE/iX 5.0 Documentation