Up Prev Next
From: "Johnson, Phil" <Phil dot Johnson at fmr dot com>
Subject: Handling Server Error messages
Date: Apr 24 1998 8:24PM
I'm playing around with the script, "sql.pl" in the sybperl "eg"
directory and using the first example in that script.
I am connecting into a Sybase Mainframe Server Gateway (MSG) and trying
to list all the RPCs that are defined.
I use the following code:
$d = new Sybase::DBlib 'blar', 'blar', DCAT_DAL1_G_ACP;
# sql() returns a 'reference' to an array:
$ref = $d->sql("exec sgw_status rpc");
foreach $line (@$ref) # 'de-reference' the pointer
It works well, however, at the top of the output, I receive an info
message which I want to ignore:
Msg 5703, Level 10, State 0
Changed language setting to 'us_english'
This is printed to STDERR, and, according to Sybase:
These are all informational messages and may be ignored. If you wish to
suppress them, add the following line to your SERVER message callback
if (msgno==5701 || msgno==5703 || msgno==5704)
These messages cannot be suppressed on the server side, they must be
handled on the client side.
Are there any examples of handling these messages? Can someone point me
in the right direction to solve this problem?
I've diddled and fiddled with ct_callback, but I've gotten nowhere.