>COBOL PERFORM Statement - HP COBOL II/XL The COBOL PERFORM statement transfers control explicitly to one or more procedures, and implicitly returns control to the statement after the current PERFORM statement when execution of the specified procedure or procedures is complete.

>COBOL Study Material for PERFORM Statement The simple form of the PERFORM in COBOL acts very similar to GO TO statement, except that after execution of paragraph control will return back to the next statement.

>Course Notes for COBOL PERFORM The PERFORM verb will execute the specified paragraph and then control will return to the statement following the PERFORM. There are no restrictions as to the physical placement of a paragraph compared to the COBOL PERFORM statement that executes it.

>Example Programs for COBOL PERFORM An example program demonstrating how the first format of the COBOL PERFORM verb may be used to change the flow of control through a program. Demonstrates the second format of the PERFORM statement. The PERFORM TIMES may be used to execute a block of code x number of times. Demonstrates how the PERFORM UNTIL (third format) may be used to process a stream of values where the length of the stream cannot be determined in advance. Demonstrates how the PERFORM VARYING and the PERFORM VARYING..AFTER (fourth format) may be used for counting iteration. Also introduces the WITH TEST BEFORE and WITH TEST AFTER phrases.

>PERFORM in COBOL - Micro Focus Visual COBOL The PERFORM in COBOL 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 used to control execution of one or more imperative statements which are in the scope of that PERFORM in COBOL statement.

>PERFORM in COBOL Standards Even though COBOL allows the PERFORM command to be used on paragraphs as well as sections, its use should be limited to sections only. If necessary make the offending paragraph into a self-contained section, or an in-line PERFORM (if it is small enough). This guideline then avoids the possibility that someone may split the paragraph in two, thereby causing the PERFORM to terminate at the new paragraph name.

>PERFORM UNTIL Syntax The COBOL PERFORM UNTIL syntax provides iteration support, allowing a section of code to be executed multiple times.