Requests passed from a batch statement can be conditional, using the following syntax:
IF LASTCC condition number THEN
statement_1
statement_2
statement_3
.....
ELSE
statement_4
statement_5
statement_6
.....
ENDIF
where
Tokens in the IF statement must be separated by blanks. Nested IF statements are not supported. The whole IF statement must reside in the same input record.
ELSE and its group of statements are optional. If used, it must be the only token in a record.
ENDIF must be the only token in a record.
Example
COND CHECK CONDITION_A 0104
IF LASTCC EQ 8 THEN
COND ADD CONDITION_A 0104
ELSE
COND ADD CONDITION_B 0104
MAIL TO USER1
MAIL TEXT CONDITION_B ADDED
MAIL SEND
ENDIF
Parent Topic |