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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: EXIT SQL.SQLCODE and ksh

RE: EXIT SQL.SQLCODE and ksh

From: Davide Bellesi <davide.bellesi_at_visto.com>
Date: Fri, 15 Sep 2000 06:51:28 -0700
Message-Id: <10620.117134@fatcity.com>


Hi

error=3D `sqlplus lisa/shutup << !=20

        begin
         ...
       exception
       dbms_output.put_line(sqlcode);
       end;
      exit;=20

 ! `

echo $error

Davide

-----Original Message-----
From: Marina Leonardo, Jose Luis JLMarina_at_Uni2.es Sent: Fri, 15 Sep 2000 01:35:49 -0800 To: ORACLE-L_at_fatcity.com
Subject: RE: EXIT SQL.SQLCODE and ksh

Hi Lisa,

echo $?, echoes the last return code from a program.=20 But there is a problem: unix program return codes are from 0 to 255 (I think)

HTH =09Joselu
=09http://www.oraes.com

> -----Mensaje original-----
> De:=09Koivu, Lisa [SMTP:lkoivu_at_qode.com]
> Enviado el:=09jueves 14 de septiembre de 2000 21:56
> Para:=09Multiple recipients of list ORACLE-L
> Asunto:=09EXIT SQL.SQLCODE and ksh

>=20
> Anyone know how to catch this value in a ksh script? I believe I've se=
en
> it done before but I just can't remember how. For example:

>=20

> ...ksh script executing=20
>=20

> sqlplus lisa/shutup << !=20
> whenever sqlerror exit sql.sqlcode=20
>=20

> ..statements...=20
> exit;=20
> !=20
>=20

> Do something with the error value down here in the ksh script.=20
>=20

> Thanks everyone=20
> GO VIKINGS!=20
>=20

> Lisa Rutland Koivu=20
> Oracle Database Administrator=20
> Qode.com=20
> 4850 North State Road 7=20
> Suite G104=20
> Fort Lauderdale, FL 33319=20
>=20

> V: 954.484.3191, x174=20
> F: 954.484.2933=20
> C: 954.658.5849=20
> <http://www.qode.com>=20

>=20
> "The information contained herein does not express the opinion or posit=
ion
> of Qode.com and cannot be attributed to or made binding upon Qode.com."
>=20
--=20
Author: Marina Leonardo, Jose Luis
  INET: JLMarina_at_Uni2.es
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).
_________________________________________________________________________=
__
Visit http://www.visto.com/info, your free web-based communications cente= Received on Fri Sep 15 2000 - 08:51:28 CDT

Original text of this message

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