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

Home -> Community -> Mailing Lists -> Oracle-L -> PART II: - Beyond a basic Oracle EXP/IMP shell script: Error Handling & Exit Status?

PART II: - Beyond a basic Oracle EXP/IMP shell script: Error Handling & Exit Status?

From: Marquez, Chris <cmarquez_at_collegeboard.org>
Date: Wed, 31 Aug 2005 11:11:15 -0400
Message-ID: <B30C2483766F9342B6AEF108833CC84E05BD5F5F@ecogenemld50.Org.Collegeboard.local>

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;



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=$?
echo 'RETURN CODE' >> $log_file 2>&1
echo $RC >> $log_file


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 $?=1 when child scrip; imp_script.sh fails with RC=1?

Meaning if import.sh; RC=1, then I want imp_wrapper.sh; RC=1 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

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Aug 31 2005 - 10:13:17 CDT

Original text of this message

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