COBOL Perform Through

COBOL Simple Perform COBOL Perform Times

Advertisements


THROUGH/THRU PERFORM is mainly used to execute the large set of statements/block of statements executed which are separated with different paragraph/section.

In THROUGH/THRU another paragraph which will act as a end of the performing paragraph.

THROUGH/THRU PERFORM was OUTLINED PERFORM only.


Syntax:

PERFORM {Routine/paragraph/Section} 
   THRU {Routine/paragraph/Section}

There is no INLINE PEFORM for this THROUGH/THRU PEFORM hence the inline perform will not perform the routines.

THRU PERFORM will be applicable if PERFORM has paragraphs/Routines.

If PERFORM coded with THRU, system will not check for the starting of routine or end of the program to decide the end of current performing routine.

The routine with THRU will act as end of current performing routine.

System will execute the number of routines in between the routine with PERFORM and routine with PERFORM THRU.


Practical Example - PERFORM THROUGH:


Code:



Jcl:



Output:



COBOL Simple Perform COBOL Perform Times

Advertisements