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
REWRITE STATEMENT: As in the situation of a relative file, the REWRITE statement needs that the file should be opened in the I-O mode, and if the SEQENTIAL access mode is spec

Example of File-control: The assign clause assigns a specific physical peripheral device name to a file. The physical peripheral device are machine-dependent. We use the devic

What is the difference b/w index and subscript? Subscript indicates to the array occurrence whereas index is the displacement (in no of bytes) from the beginning of the array.

PROGRAM FOR ELECTRICITY BILL: An electricity company supplies electricity to 4 types of customers coded 1, 2, 3 & 4.The rate schedule for customers is shown in one table as

READ STATEMENT: The aim of this verb is to make available the next logical record from the input file. It is important to note the meaning of the "next" logical record in the

PROGRAM FOR INVENTORY  We have to write a program to update the inventory file. Consider 2 files,viz, invfile an tranfile. Invfile has 3 fields pno,name,qty. Tranfile has 3 fil

SUBTRACT VERB: The SUBTRACT verb is used to subtract one, or the sum of two or more numbers from one or more numbers and to store the result. The form of the SUBTRACT verb

ARITHMETIC VERBS: Most of the problems need some computations to be performed on the input or intermediate data that are numeric in nature. The Arithmetic verbs are used to pe

COMPUTE VERB: The COMPUTE verb is very powerful. All the evaluations performed by the other 4 verbs can also be completed easily by using the COMPUTE verb. Its normal format i

Identification Division: The Identification Division is the first division of each and every COBOL source program. The paragraph PROGRAM-ID is necessary in most of the mac