THEN is part of the compound statement IF .... ; THEN ; .... ; ELSE ; ...... It comes before the statement (or group of statements surrounded by DO ; ... ; ENDDO ; which are to be executed if the result of the expression on the IF statement is true.
THEN ;
Usage
THEN has no arguments; it is required as the next statement immediately following an IF statement. The statement immediately following the THEN statement will be executed if the result of IF is true. If you want more than one statement executed when the IF clause is true, enclose all the statements in a DO ; .... ENDDO ; group.
IF LOGL>OLDL ; THEN ; DO ;
SET OLDL = LOGL ;
COPY @COEF SAVEB ;
ENDDO ;
See also the examples for the ELSE statement.