Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Passing error from PL?SQL to UNIX script wrapper. (How?)

Re: Passing error from PL?SQL to UNIX script wrapper. (How?)

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: Tue, 23 Jun 1998 00:42:54 GMT
Message-ID: <6mmtm5$7ur@bgtnsc03.worldnet.att.net>


On Sat, 20 Jun 1998 11:46:54 -0500, "ALEX J JENTILUCCI" <ALEXJENT_at_prodigy.net> wrote:

>Now I have a UNIX script which , among other things, executes a PL/SQL block via SQL*PLUS. It appears that when a NO_DATA_FOUND error occurs the UNIX script does not 'see' the error. In the UNIX script the first thing I do is check the exit code of the previous statement (sqlplus @filename etc..)
>
>When I echo out the exit code is 0.

I believe you have to also use WHENEVER SQLERROR EXIT in your SQL*Plus script. That's what propogates the error from SQL*Plus back to the OS.

Jonathan Received on Mon Jun 22 1998 - 19:42:54 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US