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
NEGATED SIMPLE CONDITION: Any of the easy condition explained can be preceded by the logical operator NOT. The consequence of placing the operator NOT before an easy condition

FD Entry for variable-length Records: The RECORDS CONTAINS and BLOCK CONTAINS clause are quite dissimilar in the case of files with variable- length records. The syntax of the

INPUT-OUTPUT SECTION: This section holds information regarding the files to be used in the program. There are 2 paragraphs in this section- FILE-CONTROL & I-O-CONTROL. The

IF ... ELSE STATEMENT: We are familiar with an easy form of the IF statement. The common form of the IF statement is as shown below: Each of the statement-1 and statem

Rules of read statements: The next record is identified according to the rules as shown below: (i) Whenever the READ NEXT statement is the initial statement to be executed

PROGRAM FOR MASTER FILE MAINTENANCE: We have to write a program to keep the stu-file for which a record has just 2 fields,viz., rno(Roll Number) and name(Student Name). Give t

PROGRAM FOR PERFORM - THRU: We have to write a program to elaborate PERFORM ...THRU statement Identification division. Program- id.  Perfthru. Environment division.

FILE DESCRIPTION- FIXED-LENGTH RECORDS: The normal characteristics of a file are explained in the file description (FD) entry of the DATA DIVISION.

Record Description for the Variable-length Records: When the variable- length records consists of records of various lengths, each record type is to be explained at level 01 f

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.