Cron problem
Posted in 1994
Topics: Server Administration, Migration, Import/Export & Data Conversion
Hi all,
Many an eon have I been a silent watcher of the Informix newsgroup
(and thanks again Walt for a job well done), silently watching and
waiting for my moment of glory. And now it has come!
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
Finderr 802 tells me this:-
-802 Cannot open file for run.
The SQL command file you specified cannot be opened for reading.
Review the file name specified. If it is spelled as you intended, make
sure that it exists in the current directory or in a directory named in
the DBPATH environment variable and that your account has read
permission for it.
The strange thing is, I know that the command file is there. This is
evidenced by the fact that if I keep typing /usr/clark/sitedatunl.sh
a few times (say 5 times over a five minute period) it will work. Maybe
it's something to do with my current working directory? There
is definitely no-one else on the system editing this file.
So what is causing the -802?
FYI the shell script
INFORMIXDIR=/usr/informix
PATH=$PATH:/usr/informix/bin
DBDATE=DMY4/TBCONFIG=tbconfig.01
export INFORMIXDIR PATH DBDATE TBCONFIG/usr/informix/bin/dbaccess -s live sitedatunl.sql
rcp /tmp/stunload rswa:/usr/rs/rswa/.
FYI the SQL command file
unload to "/tmp/stunload"
select stsh_stockid,
stsh_onhandqty / stsm_ssm,
(stsh_onordqty + stsh_isordqty) / stsm_ssm,
stsh_backordqty / stsm_ssm,
stsh_minqty / stsm_ssm,
stsh_optqty / stsm_ssm
from st_stockhold, st_stockmaster
where stsh_siteid = "W"
and stsm_stockid = stsh_stockid
Any help would be appreciated.
Clark
__ _ _
/ ) // / _// _/_
/ // __. __ /_ / __. , , , / ________
(__/ </_(_/|_/ (_/ <_ /___ (_/|_(_(_/_<__(_) / / <_
MIS Manager
RS Components - Australian Group