#!/usr/bin/perl -w use strict; use DBI; use Getopt::Std; use vars qw/ $opt_d $opt_u $opt_p /; my $db = 'SPROD'; my $user = 'SPROD'; my $pass = 'SPROD'; my $dbd = 'Oracle'; my $sql = 'exec RBC_test( :? );'; getopts ( "d:u:p:h" ); if ( $opt_d ) { $db = $opt_d; } if ( $opt_u ) { $user = $opt_u; } if ( $opt_p ) { $pass = $opt_p; } my $dbh = DBI->connect ( $db, $user, $pass, $dbd ); if( !$dbh ) { print "Cannot connect to database: $DBI::errstr\n"; die "Terminating\n"; } my $sth = $dbh->prepare( $sql ); #$sth->bind_param( ":p", 123 ); $sth->execute(321) or print "Error [" . $sth->errstr . "]\n"; my $rc = $dbh->disconnect(); print "Disconnected rc = $rc\n";