chuckster has asked for the wisdom of the Perl Monks concerning the following question:
and invoke_sqlplus.plbegin forbesc.test_exception_pg.main('orafail'); end; / exit
I'm pretty sure that the reason I'm always getting a 0 for $out is because the 'exit' in run_program.sql is executing successfully, but I want to know when the Oracle package is not executed successfully. I know it's not in the above case, as the output looks like:#!/usr/bin/perl -w my $sqlplus = "sqlplus -s chuckster/im_in\@develo"; my $file = "\@/home/prodadm/scripts/run_package.sql"; my $var = (system($sqlplus . " " . $file)); my $out = $? >> 8; print "The out value is '$out'.\n";
I'm at a loss. Could someone help plant a fire under me and get me going in the right direction? Thanks, Chuckster[prodadm@ora4 scripts]$ ./invoke_sqlplus.pl begin * ERROR at line 1: ORA-01476: divisor is equal to zero ORA-06512: at "FORBESC.TEST_EXCEPTION_PG", line 12 ORA-06512: at line 2 The out value is '0'.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: invoking Oracle's SQL Plus, return code always indicates success
by Roy Johnson (Monsignor) on Apr 06, 2005 at 22:58 UTC | |
by chuckster (Initiate) on Apr 06, 2005 at 23:11 UTC | |
by dragonchild (Archbishop) on Apr 07, 2005 at 00:20 UTC | |
by Roy Johnson (Monsignor) on Apr 07, 2005 at 03:21 UTC | |
|
Re: invoking Oracle's SQL Plus, return code always indicates success
by Joost (Canon) on Apr 06, 2005 at 22:56 UTC |