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: Michael Peppler <mpeppler at peppler dot org>
Subject: Re: Return Status of Stored Procedure
Date: Jun 1 1999 1:57PM

Tan Saw Phaik writes:
 > Michael,
 > 
 >        Thanks for the solution! I tried the foll. codes 
 >          
 >        @rows = $dbh->ct_sql(<<'SQL_EOF');
 >        exec ahsekeep_oper_rem_ret
 >        SQL_EOF       
 >       
 >        $i = 1
 >        foreach (@rows) {
 >          $status[$i] = $$_[0];
 >          $i++;
 >        }
 >       print OUTFILE "$status[$i-1]\n";
 >       
 >       and managed to get the return status (ie " $status[$i-1]")
 >       of the stored procedure.
 >       
 >        Is there another way to get the return status without writing to another  
 >  array ?

Sure:

print OUTFILE "$rows[0][0]\n";

Michael

-- 
Michael Peppler         -||-  Data Migrations Inc.
mpeppler@peppler.org    -||-  http://www.mbay.net/~mpeppler
Int. Sybase User Group  -||-  http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com