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: Oracle error codes out to VMS 7.1

Re: Oracle error codes out to VMS 7.1

From: Joe Kazimierczyk <kazimiej_at_bms.com>
Date: Mon, 08 Feb 1999 08:20:13 -0500
Message-ID: <36BEE48C.7340740D@bms.com>


Depends where you want to get it out from. If you're using sqlplus, you can do this with sqlplus's exit command. You might also want to read up on the 'whenever sqlerror' command. you can do things like 'whenever sqlerror exit sql.sqlcode' or 'whenever sqlerror exit 3'. For example:

SQL> whenever sqlerror exit sql.sqlcode; SQL> select 4/0 from dual;
ERROR: ORA-01476: divisor is equal to zero

Disconnected from Oracle7 Server Release 7.3.4.0.1 - Production With the distributed, replication and parallel query options PL/SQL Release 2.3.4.0.0 - Production
%SYSTEM-F-FLTINE_F, floating inexact fault, PC=00000000, PS=000005C4

$ write sys$output f$integer('$status)
1476
$ ! that's your oracle error number!

Just be careful with your dcl error handling of the sql error code.

Ian wrote:

> Hi,
> Can anyone out there tell me if it is possible to get an Oracle
> error code out to VMS so I can use a bit of DCL to check the value and
> abnormally exit a COM routine ie $ exit 44
>
> Thanks
>
> Ian.
>
> --
> Click here to e-mail me mailto:ian.downham_at_which.net
Received on Mon Feb 08 1999 - 07:20:13 CST

Original text of this message

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