SQL/MP Reference Manual

HP NonStop SQL/MP Reference Manual523352-013
X-19
Examples—=_SQL_MSG_node
To use an alternate message file from a program, specify an =_SQL_MSG_node
DEFINE in TACL before you execute the program, or specify the DEFINE at the
beginning of the program. SQL uses the file you specify for all SQL messages from
the program.
If you plan to switch message files within a program by changing the
=_SQL_MSG_node DEFINE in the body of the program, be aware that SQL opens
the message file the first time you call any one of these procedures:
SQLCADISPLAY
SQLCAFSCODE
SQLCATOBUFFER
SQLSADISPLAY
SQLSA_DISPLAY2
SQLCA_TOBUFFER2
Whether SQL closes the message file when it returns from the procedure depends
on the parameters you supply in the procedure call.
If the message file is left open, SQL uses the same message file the next time you
call one of the procedures. If the file is closed, SQL opens the message file
(possibly a different one) again the next time you call one of the procedures listed
previously.
Each time SQL opens the message file, it selects the file specified in the current
=_SQL_MSG_node DEFINE, if any. Changes you make to the
=_SQL_MSG_node DEFINE have no effect on a message file that is already
open.
If SQL attempts to open $SYSTEM.SYSTEM.SQLMSG and finds that it does not
exist, is invalid, or is incompatible with the SQL/MP software, SQL is unable to
issue error, warning, or help messages. Only a few English informational
messages that are coded in the software will be available. This situation should
never occur, however, if SQL is installed properly and the standard SQL message
file is always left in $SYSTEM.SYSTEM.SQLMSG.
Examples—=_SQL_MSG_node
This TACL command designates an alternate message file for SQL/MP software
running on system \HQ. (This command would not work if a DEFINE named
=_SQL_MSG_HQ was already in effect.)
ADD DEFINE =_SQL_MSG_HQ, CLASS MAP, FILE \HQ.$SQL.MSG.SPANISH
This TACL command specifies a different SQL message file for node \XYZ if a
DEFINE named =_SQL_MSG_XYZ already exists.
ALTER DEFINE =_SQL_MSG_XYZ, FILE \HQ.$SQL.MSG.FRENCH