abc.btq is a bteq file containing some teradata bteq statements. The problem here is that this shell script runs absolutely fine if i execute it manually proving the fact that abc.btq is correct . The output is a log file containing the statement 'successful'
But when i inserted the same shell script in crontab(a scheduler in unix) to execute it at a specific time everyday, it doesn't run.
Hence the result is a log file of size 0 bytes. This brings me to the conclusion that the crontab can never execute a bteq script?. Can anybody help me out with this problem as to how to execute a bteq file using crontab
Hi, The first problem with this could be the path of the script. You can use a small bit of code as follows: /* Calling shell */ dir=`dirname $0` bteq < $dir/k_2224.sql > $dir/k_2224.out 2>&1 exit $? /* End of calling shell */
Put this bit in a shell program and then call the shell program. the cronjob will easily recognise this and run without a hitch. If it doesn't work, you can get back to me and I will look at it again.