Re: Shell does not return control

From: bidon70 (bidon70_at_hotmail.com)
Date: 12/02/03


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



Relevant Pages

  • Re: Shell does not return control
    ... > a common issue when executing shell scripts, ... the shell stops and does not return control to the next ... so the error handling code is not executed. ...
    (comp.unix.shell)
  • Re: Basic question on shell
    ... in the same shell, by sticking a dot in front of it. ... > the script executes and comes back to my current directory. ... > not same as that of directory i was in while executing the ... If you wish to confirm the origin or content of this communication, ...
    (AIX-L)
  • Re: DAO peculiarity in A97?
    ... The reason I didn't set error handling back on is because, as you mention, ... it should go out of scope when the procedure ends, ... turn it back on then off again before executing the next ... >> Set rstRRs = Nothing ...
    (comp.databases.ms-access)
  • Re: Cocoa Newbie Question.
    ...  Don't be surprised if executing the program appears to ... no response at all, since "test" is a shell builtin. ... on other people asking for help by ganging up with another poster to ...
    (comp.sys.mac.programmer.help)
  • Re: Cocoa Newbie Question.
    ...  Don't be surprised if executing the program appears to ... no response at all, since "test" is a shell builtin. ... Congratulations on having one less poster here on mac.programmer.help. ...
    (comp.sys.mac.programmer.help)