From oracle-l-bounce@freelists.org Wed Aug 31 10:13:17 2005 Return-Path: Received: from air891.startdedicated.com (root@localhost) by orafaq.com (8.12.10/8.12.10) with ESMTP id j7VFDHMo013009 for ; Wed, 31 Aug 2005 10:13:17 -0500 X-ClientAddr: 206.53.239.180 Received: from turing.freelists.org (freelists-180.iquest.net [206.53.239.180]) by air891.startdedicated.com (8.12.10/8.12.10) with ESMTP id j7VFDBIP012987 for ; Wed, 31 Aug 2005 10:13:11 -0500 Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id BE6FC1E8034; Wed, 31 Aug 2005 10:13:06 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20894-07; Wed, 31 Aug 2005 10:13:06 -0500 (EST) Received: from turing (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 325A11E8019; Wed, 31 Aug 2005 10:13:06 -0500 (EST) X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C5AE3E.3B705CD0" Subject: PART II: - Beyond a basic Oracle EXP/IMP shell script: Error Handling & Exit Status? Date: Wed, 31 Aug 2005 11:11:15 -0400 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: PART II: - Beyond a basic Oracle EXP/IMP shell script: Error Handling & Exit Status? Thread-Index: AcWuPjttAtG9CoOERVqGWYbbKZQsLg== From: "Marquez, Chris" To: X-archive-position: 24820 X-ecartis-version: Ecartis v1.0.0 Sender: oracle-l-bounce@freelists.org Errors-To: oracle-l-bounce@freelists.org X-original-sender: cmarquez@collegeboard.org Precedence: normal Reply-To: cmarquez@collegeboard.org X-list: oracle-l X-Virus-Scanned: by amavisd-new-20030616-p9 (Debian) at avenirtech.net X-mailscan-MailScanner-Information: Please contact the ISP for more information X-mailscan-MailScanner: Found to be clean X-MailScanner-From: oracle-l-bounce@freelists.org X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on air891.startdedicated.com X-Spam-Status: No, hits=-3.9 required=5.0 tests=AWL,BAYES_00,HTML_MESSAGE autolearn=ham version=2.63 ------_=_NextPart_001_01C5AE3E.3B705CD0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable In my original quest for help I was working with one script. (btw with you help/code I did complete this task...works well, thanks!) Now I have a new problem that I do not know how to deal with. I have a wrapper script involved this time. Something like this; =3D=3D=3D=3D=3D imp_wrapper.sh ... #RUN THIS SCRIPT script1.sh #RUN THIS FUNCTION do func1 #RUN THE IMP SCRIPT imp_script.sh #RUN THIS SCRIPT script2.sh #RUN THIS FUNCTION do func2 # RETURN CODE: Set next Return Code. RC=3D$? echo 'RETURN CODE' >> $log_file 2>&1 echo $RC >> $log_file =3D=3D=3D=3D=3D My imp_script.sh has "trap" code and "RETURN CODE" syntax/value also in = the script. But I need to be able to STOP/EXIT/END the parent script; imp_wrapper.sh = and set $?=3D1 when child scrip; imp_script.sh fails with RC=3D1? Meaning if import.sh; RC=3D1, then I want imp_wrapper.sh; RC=3D1 = immediately and exit? This confuses me and I have no idea how to pass child (exit) RC to the = parent script. Thanks in advance, Chris Marquez Oracle DBA ------_=_NextPart_001_01C5AE3E.3B705CD0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable PART II: - Beyond a basic Oracle EXP/IMP shell script: Error = Handling & Exit Status?

In my original quest for help I was working with one = script.
(btw with you help/code I did complete this task...works well, = thanks!)

Now I have a new problem that I do not know how to deal with.
I have a wrapper script involved this time.

Something like this;

=3D=3D=3D=3D=3D
imp_wrapper.sh
...

#RUN THIS SCRIPT
script1.sh

#RUN THIS FUNCTION
do func1

#RUN THE IMP SCRIPT
imp_script.sh

#RUN THIS SCRIPT
script2.sh

#RUN THIS FUNCTION
do func2

# RETURN CODE: Set next Return Code.
RC=3D$?
echo 'RETURN CODE' >> $log_file 2>&1
echo $RC >> $log_file
=3D=3D=3D=3D=3D

My imp_script.sh has "trap" code and "RETURN CODE" = syntax/value also in the script.

But I need to be able to STOP/EXIT/END the parent script; imp_wrapper.sh = and set $?=3D1 when child scrip; imp_script.sh fails with RC=3D1?

Meaning if import.sh; RC=3D1, then I want imp_wrapper.sh; RC=3D1 = immediately and exit?

This confuses me and I have no idea how to pass child (exit) RC to the = parent script.

Thanks in advance,

Chris Marquez
Oracle DBA

------_=_NextPart_001_01C5AE3E.3B705CD0-- -- http://www.freelists.org/webpage/oracle-l