PERFORM statement.

The PERFORM statement is used to transfer control explicitly to one or more procedures and to return control implicitly whenever execution of the specified procedure is complete. The PERFORM statement is also used to control execution of one or more imperative statements that are within the scope of that PERFORM statement.

Format 1.

          PERFORM procedure-name-1 [ { THROUGH } procedure-name-2 ]
                                     { THRU    }

		[ times-phrase   ]
                [ until-phrase   ]
                [ varying-phrase ]

Format 2.

		  [ times-phrase   ]
          PERFORM [ until-phrase   ] imperative-statement-1 END-PERFORM
                  [ varying-phrase ]

  times-phrase.

        { identifier-1 } TIMES
        { integer-1    }

  until-phrase.

        [ [ WITH ] TEST { BEFORE } ] UNTIL condition-1
                        { AFTER  }

  varying-phrase.

        [ [ WITH ] TEST { BEFORE } ]
                        { AFTER  }

                  VARYING { identifier-2 }
                          { index-name-2 }

                          FROM { identifier-3 }
                               { index-name-3 }
                               { literal-3    }

                        [ BY { identifier-4 } ]
                             { literal-4    }

                          UNTIL condition-1

                [ AFTER { identifier-2 }
                        { index-name-2 }

                          FROM { identifier-3 }
                               { index-name-3 }
                               { literal-3    }

                        [ BY { identifier-4 } ]
                             { literal-4    }

                          UNTIL condition-1 ] ...