PERFORM command (COBOL)

The PERFORM command transfers control explicitly to one or more statements and implicitly returns control to the next executable statement after execution of the specified statements is completed. The keywords cannot be abbreviated.

Simple:
Read syntax diagramSkip visual syntax diagram
            .---------.                   
            V         |                   
>>-PERFORM----command-+--END-PERFORM--;------------------------><

command
A valid Debug Tool command.
Repeating:
Read syntax diagramSkip visual syntax diagram
>>-PERFORM--+----------------------------+---------------------->
            |                 .-BEFORE-. |   
            '-+------+--TEST--+--------+-'   
              '-WITH-'        '-AFTER--'     

>--+----------------------------------------------------+------->
   '-VARYING--reference--FROM--reference--BY--reference-'   

                     .---------.                   
                     V         |                   
>--UNTIL--condition----command-+--END-PERFORM--;---------------><

reference
A valid Debug Tool COBOL reference.
condition
A simple relation condition.
command
A valid Debug Tool command.

Usage notes

Examples

Refer to the following topics for more information related to the material discussed in this topic.