Clark Lawtom writes:
> Every evening at 5pm I run the following from cron
>
> 00 17 * * 1,2,3,4,5 /usr/clark/sitedatunl.sh
>
> Eight out of ten times this works fine, but every week or so it
> falls over with the message
>
> -802 Cannot open file for run
Have you tried giving the sql command file an absolute path name? For instance,
instead of:
/usr/informix/bin/dbaccess -s live sitedatunl.sql
have you tried:
/usr/informix/bin/dbacces -s live /usr/local/sitedatunl.sql
(or wherever the sql file exists)? The other option is to put a cd <directory>
command into the script so you are sure of "where you're at":
INFORMIXDIR=/usr/informix
PATH=$PATH:/usr/informix/bin
DBDATE=DMY4/TBCONFIG=tbconfig.01
export INFORMIXDIR PATH DBDATE TBCONFIGcd some_directory_where_the_sql_command_script_is
/usr/informix/bin/dbaccess -s live sitedatunl.sql
rcp /tmp/stunload rswa:/usr/rs/rswa/.
Let me know if either of these solutions helps.
Troy Burns
Publishing Business Systems E-mail: troyb@pbs.com
2833 Fairview Ave N., Suite B Phone: (612) 639-1726 x246
St. Paul, MN USA 55113 #include <std/disclaimer.h>