Re: shell scripts
Posted in 1998
On Thu, 27 Aug 1998, Tony Francis wrote:
> Thanks to all who replied to my last post. With your wisdom and assistance I
> can now run dbaccess from my unix command prompt without any problem. I am
> however still experiencing difficulties when trying to call dbaccess from
> within a shell script. I am running a Sun Ultra 5 with Solaris 2.5.1. My
> version of perl is 5.
> It doesn't seem to matter what I do in a script, it comes up with one error or
> another. I've tried turning everything upside down and inside out, but I am no
> closer to success.
Have you validated the environment? Don't forget that if you are playing
with CGI and wweb servers, the environment is very different from what you
get when you login yourself. Whenever you're attempting to use Informix
databases and web servers, make sure you know what the environment is set
to and why it is set to that. You may need to modify your web server set
up to export more environment information, or your shell script may need to
set the Informix environment ab initio.
> Essentially what I need to do is this :
> I run an ISP, and we have user information stored in our Informix database.
> What I want to be able to set up is a script that will enable the user to log
> on, give their username and password and a date range for their query, save
> their username and the date range to environment variables, then perform a
> select query on the database based on these variables.
> I know I'm probably stretching the friendship here, but if anybody might have
> a working script that you believe might work in my environment would it be
> possible to have a copy of it :-)
No, sorry, I don't. As someone else suggested, you might want to consider
DBD::Informix -- see my signature.
Yours,
Jonathan Leffler (jleffler@informix.com) #include <witticism.h>
Guardian of DBD::Informix v0.60 -- http://www.perl.com/CPAN
Informix IDN for D4GL & Linux -- http://www.informix.com/idn