CRITICAL
Rule Definition
The PERFORM statement transfers control explicitly to one or more procedures and implicitly returns control to the next executable statement after execution of the specified procedures is completed.
If the second procedure of a PERFORM THRU is not defined after the first one, the source code is semantically incorrect and the program doesn't behave as expected.
Remediation
The second procedure of a "PERFORM THRU" statement should be defined after the first procedure
Violation Code Sample
PROCEDURE DIVISION
PERFORM DISP-CLASS
THRU DISP-CLASS-EXIT
STROP RUN
DISP-CLASS-EXIT
EXIT
DISP-CLASS
ACCEPT ...
EVALUATE ...
...
...
END EVALUATE
Fixed Code Sample
PROCEDURE DIVISION
PERFORM DISP-CLASS
THRU DISP-CLASS-EXIT
STROP RUN
DISP-CLASS
ACCEPT ...
EVALUATE ...
...
...
END EVALUATE
DISP-CLASS-EXIT
EXIT
Reference
https://www.ibm.com/support/knowledgecenter/SS6SG3_4.2.0/com.ibm.entcobol.doc_4.2/PGandLR/ref/rlpsperf.htm
Related Technologies
Technical Criterion
Programming Practices - Structuredness
About CAST Appmarq
CAST Appmarq is by far the biggest repository of data about real IT systems. It's built on thousands of analyzed applications, made of 35 different technologies, by over 300 business organizations across major verticals. It provides IT Leaders with factual key analytics to let them know if their applications are on track.