COBOL Simple Perform

COBOL Iterative Programming COBOL Peform Through

Advertisements


Simple perform is mainly used to execute the large set of statements/block of statements executed separated in different paragraph/section.

Simple PERFORM was categorized to both INLINE/OUTLINED PERFORM.


Syntax:

Inline Perform:

PERFORM 
       Statements
END-PERFORM.

Outline Perform:

PERFORM {Routine/paragraph/Section}


The INLINE PERFORM for this SIMPLE PEFORM executes the set of statements only once hence there was no condition associated with it.


Practical Example:


A simple program shows the Simple PERFORM coding in COBOL program.


Code:



The above example describes about outline simple PERFORM which will display student class based on inputs.


Jcl:



Output:



Note:

The end of the program or the starting of other paragraph is considered as a end of the paragraph used in simple PERFORM.


COBOL Iterative Programming COBOL Peform Through

Advertisements