Re: Cannot open file 'sql.iem'
Posted in 1992
Judy - > I'm having a wonderful time implementing a script which runs out of my > crontab. Hell, I know just how you feel :-) Tue May 12 22:03:05 BST 1992 > Here's the sacego command that bombed: > > IFXDIR=/informix/bin > ASPIFX=/ASP/bin/Informix > $IFXDIR/sacego $ASPIFX/get_units > > Here's the error message: > > Cannot open file 'sql.iem' > > Here's my question: > > What is 'sql.iem'? Informix error messages, roughly. What you have to remember is that cron jobs don't set the path (beyond /bin and /usr/bin, or something like) *and* don't set up the environment. Good ol' Unix. There's a good chance that sacego's looking for INFORMIXDIR to find its error msgs, and not finding it - since it's no longer set in the environment when you run out of cron. If you've got an account that this already runs from, you can use this quick crufty hack: 1. run up vi on your shell script. 2. add a line 'set -a' to automagically export all the variables you use, just before you use any of them. 3. open a blank line below this (2), go into command mode and type '!! env'. This will add all your environment variables into the script, by reading in the output of the env(1) command. If that doesn't fix it, have you actually *got* $INFORMIXDIR/msg/sql.iem on your system ? Hope this helps !! Cheers - Tony. __________________________________________________________________________ Tony Heskett th@bnr.co.uk Voice: (+44) 279 402637 BNR, London Road, Harlow, Essex, CM17 9NA Fax: (+44) 279 451434