The PERFORM statement can be used to execute the group of consecutive statements written elsewhere in the program. We refer to this group of statements as the range of the PERFORM statement. During the execution, when a PERFORM statement is encountered, a temporary departure from the general sequential execution takes place and the statements contained in the specified range are executed. Ahead execution of the statements, the control implicitly returns to the later statement following the PERFORM statement. It is too possible to get the statements in the range executed repeatedly for a particular number of times or until a condition is satisfied. The PERFORM is a powerful COBOL verb and has 5 various forms.
The formats of a simple PERFORM statement is as shown below:
The statement group starting with the first statement of the procedure named in procedure-name-1 and ending with the last statement of the procedure names in procedure-name-2, comprises the range consists of the statements contained in the procedure referred to by procedure-name-1. Whenever the simple PERFORM statement is executed, this range is executed just once.