MODULE 7: COBOL Control statements
PERFORM THRU
- This format allows us to execute set of paragraphs at one go
- Syntax:-
PERFORM para-1 [{THRU/THROUGH} para-n]
- Example:-
In PROCUEDURE DIVISION,PARA-0. DISPLAY 'IN PARA-0' PERFORM PARA-1 THRU PARA-3 DISPLAY 'IN PARA-0 AGAIN' STOP RUN. PARA-1. DISPLAY 'IN PARA-1'. PARA-2. DISPLAY 'IN PARA-2'. PARA-3. DISPLAY 'IN PARA-3'.SYSOUT display (output):-IN PARA-0 IN PARA-1 IN PARA-2 IN PARA-3 IN PARA-0 AGAIN