If s is specified, the statement identified by it is called the terminal statement, and it must follow the DO WHILE statement. The terminal statement must not be one of the following statements:
Unconditional GO TO
Assigned GO TO
Arithmetic IF
Block IF / ELSE IF
ELSE
END IF
RETURN
STOP
END
DO / DO WHILE
If the terminal statement is a logical IF statement, it can contain any executable statement, except:
DO / DO WHILE
Block IF / ELSE IF
ELSE
END IF
END
Logical IF
If s is not specified, the DO WHILE loop must end with an END DO statement.