Rule Definition
For maintainability and readability reasons, the source must be correctly structured and the sections and paragraphs should appear after the first GO TO or PERFORM referencing them.
Remediation
Review the organization of the code and move the sections and paragraphs after their first call.
Violation Code Sample
PAR-130-A.
...
PAR-050-A.
MOVE VAL1 TO RES2.
ADD 1 TO RES2.
PERFORM PAR-130-A.
IF RES2 > MAX-VALUE
GO TO PAR-050-Z
END-IF
PAR-050-B.
...
PAR-050-Z.
...
Fixed Code Sample
PAR-050-A.
MOVE VAL1 TO RES2.
ADD 1 TO RES2.
PERFORM PAR-130-A.
IF RES2 > MAX-VALUE
GO TO PAR-050-Z
END-IF
PAR-050-B.
...
PAR-050-Z.
...
PAR-130-A.
...
Related Technologies
Cobol
Technical Criterion
Complexity - Algorithmic and Control Structure Complexity
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.