dbaccess-ish question
Posted in 1999
Topics: Server Administration
I've noticed that if I have a series of 3 SQL's, separated by ;'s and run
them interactively through dbaccess, if the second one has an error, the
session stops there. If I run dbaccess from a Unix script using the
construct
dbaccess<<EOF
3 SQL's;
EOF
If the second fails it carries on and executes the third!
Anyone know why this is and is there a work-around?
Thanks!
Don Pritchard wrote:
> I've noticed that if I have a series of 3 SQL's, separated by ;'s
> and run them interactively through dbaccess, if the second one has
> an error, the session stops there. If I run dbaccess from a Unix
> script using the construct
>
> dbaccess<<EOF
> 3 SQL's;
> EOF
>
> If the second fails it carries on and executes the third!
>
> Anyone know why this is and is there a work-around?
Why? Historical reasons.
Workaround? Try setting DBACCNOIGN in the environment, after
checking that I've spelled it correctly by doing:
strings -s 9 $INFORMIXDIR/bin/dbaccess | grep DBACC
Eventually, you'll notice that you can do:
!date
inside a script run as a here document, but not interactively.
Same hysterical raisins.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
#include <disclaimer.h>
Jonathan how do you set this variable off and on? I've tried 0,1,false,true
no luck.
Thanks
In article <36E49FA1.3C18@earthlink.net>,
jleffler@earthlink.net wrote:
> Don Pritchard wrote:
> > I've noticed that if I have a series of 3 SQL's, separated by ;'s
> > and run them interactively through dbaccess, if the second one has
> > an error, the session stops there. If I run dbaccess from a Unix
> > script using the construct
> >
> > dbaccess<<EOF
> > 3 SQL's;
> > EOF
> >
> > If the second fails it carries on and executes the third!
> >
> > Anyone know why this is and is there a work-around?
>
> Why? Historical reasons.
>
> Workaround? Try setting DBACCNOIGN in the environment, after
> checking that I've spelled it correctly by doing:
>
> strings -s 9 $INFORMIXDIR/bin/dbaccess | grep DBACC
>
> Eventually, you'll notice that you can do:
>
> !date
>
> inside a script run as a here document, but not interactively.
> Same hysterical raisins.
> --
> Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
> Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
> #include <disclaimer.h>
>
>
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own