HP 3000 Manuals

Obtaining ALLBASE/SQL Messages [ ALLBASE/SQL Pascal Application Programming Guide ] MPE/iX 5.0 Documentation


ALLBASE/SQL Pascal Application Programming Guide

Obtaining ALLBASE/SQL Messages 

As shown at 10 in Figure 3-1, you use the SQLEXPLAIN command to obtain a
message from the ALLBASE/SQL message catalog that describes the condition
related to certain SQLCA values:

     EXEC SQL SQLEXPLAIN :SQLMessage;

ALLBASE/SQL puts a message from the ALLBASE/SQL message catalog into the
host variable named SQLMessage, and the program displays the message.

Sometimes more than one message may be needed to completely describe how
an SQL command executed.  To retrieve all messages, the program in Figure
3-1 executes SQLEXPLAIN until SQLCODE is equal to zero.  ALLBASE/SQL sets
SQLCODE to zero when no more messages are available.

You can use SQLEXPLAIN in conjunction with either implicit or explicit
status checking.  Procedure SQLStatusCheck is also executed from the
routine labelled 1000, which is used in conjunction with the first
WHENEVER command in the program.

The default message catalog is SQLCT000.PUB.SYS. For native language
users, the catalog is SQLCTxxx.PUB.SYS, where xxx is the numerical value
for the current language.  (See the "Native Language Support" section in
the chapter "Getting Started with ALLBASE/SQL Programming in Pascal" for
information about how to determine the number for the current language.)
If this catalog is not available, ALLBASE/SQL issues a warning and uses
the default catalog instead.



MPE/iX 5.0 Documentation