Ch 4_2. PROCEDURE DIVISION 2: PERFORM FOR LOOP


COBOL-74

      PERFORM MODULE-NAME UNTIL condition.
      ~~~~.

  MODULE-NAME.
      ~~~
      ~~~
      ~~~ .
  ANOTHER-MODULE-NAME.

Execute all the instructions (statements, sentences) in MODULE-NAME. When the condition specified is met (true), the control returns to the statement directly following the PERFORM statement.


COBOL-85

      PERFORM UNTIL condition.
          ~~~~
          ~~~~
          ~~~~
          ~~~~
      END-PERFORM

Execute all the instructions (statements, sentences) within the PERFORM ... END-PERFORM loop. When the condition specified is met (true), the control returns to the statement directly following the END-PERFORM. statement.