ELSE signals that the statement or DO group of statements immediately following are to be executed if the last IF clause had a false result. The full syntax of the IF-THEN-ELSE sequence is IF expression; THEN; statement, or block of statements; ELSE ; statement, or block of statements ;.
ELSE ;
Usage
ELSE has no arguments. It is optional following an IF statement. If several ELSE statements appear in sequence, the first refers to the most recent IF clause, the second to the next most recent, and so forth. If more than one statement (or an INPUT command) is to be executed when the IF clause is false, enclose all the statements in a DO ; .... ENDDO ; group.
IF @SSR>LIMIT ; THEN ;
SET RESULT=@SSR ;
ELSE ; DO ;
GENR Y = Y+INCR ;
OLSQ Y C POP TIME ;
SET RESULT=@SSR ;
ENDDO ;
In the above example, the statements in the DO group are executed once and only once when the original value of @SSR is less than or equal to the value of LIMIT.