How to return BTEQ and Fastload error codes to Unix
I am running fastload scripts and BTEQ scripts from a UNIX shell script. Everything was going fine until I inserted a test to make sure there was a return code of 0. My fastload script, in the fastload output, showed a return code of 0 but Unix is picking up 1. My BTEQ script is, deliberately, falling over with a return code of 8 but is returning 0 to Unix. How can I make BTEQ and Fastload pass their return codes to UNIX?
This is the part of my shell script that is picking up a 1 from a complete OK fastload script
fastload < $vScriptName if (($? != 0)) echo 'error ' $? ' in fastload script' then vErrorText="script $vScriptNameSuffix failed" ShowError fi
Here is the end of the output that shows 0 is the return code but 1 is coming back to UNIX.