|| Published on :
Friday, May 8, 2015 || Views:
COBOL Program Demonstrates the second format of the PERFORM with example COBOL Program
$ SET SOURCEFORMAT"FREE"
AUTHOR. Michael Coughlan.
* Demonstrates the second format of the PERFORM.
* The PERFORM..TIMES format executes a block of code x
* number of times.
01 NumofTimes PIC 9 VALUE 5.
DISPLAY "Starting to run program"
PERFORM 3 TIMES
DISPLAY ">>>>This is an in line Perform"
DISPLAY "Finished in line Perform"
PERFORM OutOfLineEG NumOfTimes TIMES
DISPLAY "Back in Begin. About to Stop".
DISPLAY ">>>> This is an out of line Perform".