Control statements can make your macro more flexible and powerful because they allow you to control the sequence in which commands in the macro are executed. They can perform some action given a condition using an IF statement. They can perform some action repeatedly using a DO-ENDDO LOOP statement. They can start other macros from within a macro using a CALL and RETURN statement. The following pages document these control statements, and more.
You can also nest control statements. For example, one control statement, such as an IF statement, can contain several other control statements, such as additional IF statements or a DO statement.