|
|
Archives of the TeradataForum
Message Posted: Mon, 04 Aug 2009 @ 00:18:17 GMT
Subj: | | Re: Error Handling in BTEQ Export |
|
From: | | Vinay Bagare |
Varun,
A better way could be...
retcode=0
rm -f /tmp/outfile.txt > /dev/null 2>&1
retcode=$?
if [ $retcode -gt 0 ]; then
echo "Error while Deleteing file"
echo "Exiting...with return code $retcode"
exit $retcode
fi
# Else Continue w/ BTEQ Job
bteq < dbacpu.log
.run file logon.txt
.export report file /tmp/outfile.txt
sel databasename
from dbc.databases;
.export reset
.logoff
.quit
EOF
Thanks,
Vinay Bagare
| |