PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

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:

==================================================
use Sybase::DBlib;
 
$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
{
    print "@$line\n";
}
==================================================

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
Server 'DCAT_DAL1_G_ACP', 
	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
function:
if (msgno==5701 || msgno==5703 || msgno==5704)
return(0);
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.

Thanks,

Phil Johnson
Gateway Services
563-2376