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: Barry dot Ringuet at piog dot com (Barry Ringuet)
Subject: sybperl/NT identifier msgs
Date: Apr 17 1998 5:01PM

     The code below results in:
     C:\perl5>perl -w work\crd3.pl
     Identifier "Sybase::CTlib::VERSION" used only once: 
     possible typo at C:\perl5\lib/DynaLoader.pm line 463.
     Identifier "Sybase::CTlib::Version" used only once: 
     possible typo at C:\perl5\lib/DynaLoader.pm line 463.
     Identifier "Sybase::CTlib::Att" used only once: 
     possible typo at C:\perl5\lib/Sybase/CTlib.pm line 846.
     
     transaction_type
     0
     BUYL
     SELLL
     SELLL
     BUYL
     BUYL
     BUYL
     BUYL
     BUYL
     BUYL
     BUYL
     BUYL
     
     'Da question:
     
     What does "Identifier...(hmmm, hmmm, hmmm)
     possible typo..." mean?
     
     Have downloaded 'Perl 5.001m + sybperl for NT a full binary 
     distribution, contributed by Davide Ferina' from Michael Peppler's 
     Home Page. Installed & ran some non-sybperl scripts fine.
     
     Appreciate your help,
     Barry Ringuet
     Systems Analyst
     Pioneer Funds
     Boston
     barry.ringuet@piog.com
     
     'Da code:
     
         use Sybase::CTlib;
         ct_callback(CS_CLIENTMSG_CB, \&msg_cb);
         ct_callback(CS_SERVERMSG_CB, "crd");
         $uid = 'tops_tester'; $pwd = 'tops_tester'; $srv = 'crd';
         $X = Sybase::CTlib->ct_connect($uid, $pwd, $srv);
         $X->ct_execute("select transaction_type from trade_export");
         
         while(($rc = $X->ct_results($restype)) == CS_SUCCEED) {
             next if($restype == CS_CMD_DONE || $restype == CS_CMD_FAIL ||
                     $restype == CS_CMD_SUCCEED);
             if(@names = $X->ct_col_names()) {
                  print "@names\n";
             }
             if(@types = $X->ct_col_types()) {
                  print "@types\n";
             }
             while(@dat = $X->ct_fetch) {
                  print "@dat\n";
             }
         }
     
         print "End of Results Sets\n" if($rc == CS_END_RESULTS);
         print "Error!\n" if($rc == CS_FAIL);
     
         sub msg_cb {
             my($layer, $origin, $severity, $number, $msg, $osmsg) = @_;
     
             printf STDERR "\nOpen Client Message: (In msg_cb)\n";
             printf STDERR "Message number: LAYER = (%ld) ORIGIN = (%ld) ",
                    $layer, $origin;
             printf STDERR "SEVERITY = (%ld) NUMBER = (%ld)\n",
                    $severity, $number;
             printf STDERR "Message String: %s\n", $msg;
             if (defined($osmsg)) {
                 printf STDERR "Operating System Error: %s\n", $osmsg;
             }
             CS_SUCCEED;
         }
     
         sub srv_cb {
             my($cmd, $number, $severity, $state, $line, $server,
                $proc, $msg) = @_;
     
             printf STDERR "\nServer message: (In srv_cb)\n";
             printf STDERR "Message number: %ld, Severity %ld, ",
                    $number, $severity;
             printf STDERR "State %ld, Line %ld\n", $state, $line;
     
             if (defined($server)) {
                 printf STDERR "Server '%s'\n", $server;
             }
     
             if (defined($proc)) {
                 printf STDERR " Procedure '%s'\n", $proc;
             }
     
             printf STDERR "Message String: %s\n", $msg;  CS_SUCCEED;
         }