Re: Shell does not return control
From: bidon70 (bidon70_at_hotmail.com)
Date: 12/02/03
- Next message: bidon70: "Re: Shell does not return control"
- Previous message: John W. Krahn: "Re: How to improve performance of regular expression pattern matching"
- In reply to: Kevin Rodgers: "Re: Shell does not return control"
- Next in thread: Kevin Rodgers: "Re: Shell does not return control"
- Reply: Kevin Rodgers: "Re: Shell does not return control"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 2 Dec 2003 05:03:34 -0800
Kevin Rodgers <ihs_4664@yahoo.com> wrote in message news:<3FCBC6D9.8080107@yahoo.com>...
> 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
> }
> else
> echo "$0: $1/xml/sql/BatchLog.sql not found" >&2
> fi
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.
Thx
- Next message: bidon70: "Re: Shell does not return control"
- Previous message: John W. Krahn: "Re: How to improve performance of regular expression pattern matching"
- In reply to: Kevin Rodgers: "Re: Shell does not return control"
- Next in thread: Kevin Rodgers: "Re: Shell does not return control"
- Reply: Kevin Rodgers: "Re: Shell does not return control"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|