The conditional expression in the IF command may consist of either user-defined variables or predefined system variables.
The ELSE command clause is optional. ELSE is used only when there are statements to be executed when the condition is evaluated as false. Conditional expression is an expression which can be evaluated as either true or false. When evaluation of the expression returns a numeric result, 0 is interpreted as false; nonzero results are interpreted as true. See Utility Variables.
Teradata TPump supports the nesting of IF commands to a level of 100.
Any ELSE or ENDIF commands must be present in their entirety and cannot be composed simply of variables in need of substitution.
Commands and statements following an IF, ELSE, or ENDIF structure that are not executed are not parsed and do not have their variables substituted.