Re: PL/SQL termination status to Unix
Date: 1995/10/07
Message-ID: <4552hp$moe_at_news.acns.nwu.edu>#1/1
the solution posted was great but you cannot get an oracle error code into an 8-bit unix result status.
In article <44t1hv$lum_at_inet-nntp-gw-1.us.oracle.com>,
pzola_at_us.oracle.com (Paul Zola ) wrote:
>#!/bin/sh
>
>sqlplus -s scott/tiger << EOF+
> variable estatus number;
> begin
> :estatus := 3;
> end;
>/
> column old_estatus new_value exit_status noprint
> select :estatus old_estatus from dual;
>
> exit exit_status
>EOF+
>
>echo "exit status is $?"
>########################### cut here ###############################
>
>In case it's not obvious, you could put the assignment to the
>'estatus' variable inside of whatever conditional code you'd like,
>including an exceptions clause ....
>
> -paul
>
>==========================================================================
>Paul Zola Senior Technical
Analyst
>World-Wide Technical Support Tools
Escalations
>==========================================================================
>Computers possess the truly profound stupidity of the inanimate. - B.
Sterling
>
Dave Mausner, Sr. Consultant, Braun Technology Group, Chicago. Received on Sat Oct 07 1995 - 00:00:00 CET