Trying to get output from a procedure call.  Definitely being a pain.  Yes,
yes, I've looked at perldoc DBD::Oracle and that didn't seem to work.  I've
even read up on perldoc.com about DBI, and various other websites.  Running
out of options.

stats: Windows NT client/server with Oracle 8.1.5 installed, Perl build 629.


use DBI;

$data  = 'DBI:Oracle:test2';
$pw    = 'xxx';
$login = 'yyy';

$dbh=DBI->connect($data, $login, $pw) || die "$dbh->errstr\n";

$ssan = '999999999';
$cpnt = 'V3OBR13S00';

$xth=$dbh->do("ALTER session set nls_date_format='YYYYMMDD'") || die
"$dbh->errstr\n";

##
## Format: procedure_call(
input,input,input,input,input,output,output,output,output)
##   The last 2 inputs can be null for this to work
##

$sth=$dbh->prepare("BEGIN
      procedure_call('CURRENT','$ssan','$cpnt','','',:1,:2,:3,:4);
     END;") || die "$dbh->errstr\n";

$sth->bind_param_inout(1, \$t1,8);
$sth->bind_param_inout(2, \$t2,5);
$sth->bind_param_inout(3, \$t3,10);
$sth->bind_param_inout(4, \$t4,15);
$sth->execute;
$sth->finish;

print "$ssan-$cpnt-$t1-$t2-$t3-$t4\n";

$dbh->disconnect;


Robert E. Jones, BSCS, BSP
81 CS/SCK, Keesler AFB

Reply via email to