SH Lim wrote:
>
> Helper(s),
> Is there any way that I can run a SQL through dbaccess - <sqlfile>
> specified as a cron job in AIX.
> I've tried it this "/usr/informix/bin - /usr/informix/sqlfile.sql" as the
> command to the cron. There's a -32766 error which upon investigation could be
> INFORMIXDIR set incorrectly.
> Any idea how I can do this ?
>
> ---------------------------------------------------------
> Get Your *Web-Based* Free Email at http://www.hotmail.com
> ---------------------------------------------------------
Sweehock,
Keep in mind when a cron executes, it is usually run by a specific
login, in many cases root, or whatever login is allowed. You need to
tell cron everything in order for it to run things on your behalf.
This means putting environment variables in all your scripts, just as
if it were logging in and running the program--which is essentially
in priniciple what it's doing. Not only do you need to add environment
variables, but your typical commands should be explicitly pathed to
avoid problems. If you redirect output, the full pathname should be
on the output file as well.
Hope this helps...
Tim
--
Tim Schaefer \\\\|//
tschaefe@mindspring.com (6 6)
------------------------oOOo---( )---o00o---------
http://www.inxutil.com