Re: Shell does not return control
From: bidon70 (bidon70_at_hotmail.com)
Date: 2 Dec 2003 05:03:34 -0800
Kevin Rodgers <email@example.com> wrote in message news:<3FCBC6D9.firstname.lastname@example.org>...
> bidon70 wrote:
> > Hello everybody,
> > I'm having the following problem in a TRU64 environment; I guess it's
> > a common issue when executing shell scripts, nonetheless I could not
> > find any hint to the solution so far. Can you help me find the answer?
> > One of our Korn shells, among other things, calls oracle sqlplus as
> > follows:
> > sqlplus -s "$2" @"$1"/xml/sql/BatchLog.sql 'I'
> > if [ $? -ne 0 ]
> > then
> > <error handling>
> > fi
> > where BatchLog.sql simply calls a PL/SQL procedure.
> > If, for some reason, "$1"/xml/sql/BatchLog.sql cannot be found during
> > the execution, the shell stops and does not return control to the next
> > statement, so the error handling code is not executed. The error msg I
> > get is "SP2-0310: unable to open file ..."
> if [ -f "$1/xml/sql/BatchLog.sql" ]; then
> sqlplus -s "$2" @"$1/xml/sql/BatchLog.sql" 'I' ||
> # error handling
> echo "$0: $1/xml/sql/BatchLog.sql not found" >&2
Yes, this is the logical solution, even if I'd like to find one at the
sqlplus level. I'm searching the Oracle manuals for something useful.