Perform statement, COBOL Programming

PERFORM STATEMENT:

 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:

1728_PERFORM STATEMENT.png

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. 

 

Posted Date: 10/17/2012 2:09:04 AM | Location : United States







Related Discussions:- Perform statement, Assignment Help, Ask Question on Perform statement, Get Answer, Expert's Help, Perform statement Discussions

Write discussion on Perform statement
Your posts are moderated
Related Questions
INDEXED TABLES: The OCCURS clause that is used to define tables can optionally have an INDEXED phrase. This phrase involves the names of data items which are to be used as sub

Figurative Constants: The Figurative constants have several fixed names and the compiler recognizes these names and it sets up the equivalent values in the object program.

Illustration of Perform with varying option: A) Perform para-3 varying the k from 1 by 1 until k > 10. Here para-3 will be constantly executed 10 times (For k=1,2,3, .....1

Sign - Picture clause: The numeric data item can be signed or unsigned. If a numeric data is regarded as unsigned then during the execution these unsigned data items are treat

Rules for constructing an Arithmetic Expression: The rules for constructing an arithmetic expression are as shown below: (i) When an arithmetic expression specifies a calcu

PROGRAM USING OCCURS CLAUSE: We have to write a simple program to demonstrate Occurs Clause. Get the employee details for 3 persons and compute the total salary. identifica

ON SIZE ERROR OPTION: Whenever a size error occurs, the contents of the result field after the operation is unpredictable.  Though, the processing is not-terminated and the co

Illustration of perform statement: PERFORM    CALCUALTE-TAX. In this illustration, the CALCULATE-TAX is either a section name or paragraph name. Assume that it is a section

Illustration of nested if statement: Consider the nested sentence which is as shown below: The IF-ELSE pairs in this sentence can be detected by applying the rule whic