#!perl -w ######################################################### # This perl script will go to the oracle database, run the stored procedure # LINES_EXTRACT and update the ...... # This will also take each line data and run so that R.R. will execute. # # October 17, 2001 ######################################################### use strict; use DBI; #make the oracle connection my $dbh = DBI->connect('dbi:Oracle:Db001','developer','developer2', { RaiseError => 1, AutoCommit => 0 } ) || die "Database connection not made: $DBI::errstr"; my $rv; eval { my $func = $dbh->prepare(q{ BEGIN :rv := jb_function( parameter1_in => :parameter1); END; }); $func->bind_param(":parameter1", 'pizza'); $func->bind_param_inout(":rv", \$rv, 256); $func->execute; $dbh->commit; }; if( $@ ) { warn "Execution of stored procedure failed: $DBI::errstr\n"; $dbh->rollback; } print "Execution of stored procedure returned $rv\n"; $dbh->disconnect;