Re: Catching a TPT error in BTEQ

The SYSTEMRETURNCODE keyword can be used in an IF command condition to check the last OS command's return code for all BTEQ flavors (Linux, Windows etc.). It can also be used for an EXIT command for Windows BTEQ. This was introduced in the following versions and is in all currently supported versions:

14.00.00.2114.10.00.1515.00.00.0615.10.01.0216.00.00.00

Also with the above versions, you can use multiple conditions within one IF command.

And for completeness, just wanted to mention here that with BTEQ 16.20.00.04, conditional instructions can now be scripted using IF, ELSEIF, ELSE and ENDIF commands. And there is also a BRANCHMSG command for terser result block output for instructions skipped during a GOTO or bypassed due to being in a block where the condition checks resolved to false.