DO
DO <parameter>.
This command starts a loop. <parameter> defines the number times the loop will be executed and can have a value of up to 9999. The loop ends with an ENDDO command.

If you forget to set ENDDO, it is assumed that the end of the script corresponds to ENDDO.
DO <parameter>.
<statement block>
ENDDO.
<parameter> must be either fixed numerical value or a parameter with a numerical content.
You can use EXIT to conditionally terminate the loop. The exit condition is checked in each loop iteration. If the condition is satisfied, the loop is immediately ended and the statement after ENDDO is executed.
DO loops can be nested.
DO 5.
Counter = Counter + 1.
EXIT ( Counter = 3 ).
REF ( XYZ , XYZ_1 ).
ENDDO.