Rule Definition
Cobol 85 allows using dedicated statement terminators. For maintainability aspect, it is better to use the END-EVALUATE terminator than a simple period. If there is not an END-EVALUATE terminator in the EVALUATE sentence then the first period ends it (and not only the statement) and it is difficult to understand where is the trouble.
Remediation
Add END-EVALUATE terminator to all EVALUATE statements.
Violation Code Sample
EVALUATE MARITAL-CODE
WHEN "M"
PERFORM FIND-PARENT
ADD 2 TO PEOPLE-COUNT
WHEN "S"
WHEN "D"
WHEN "W"
ADD 1 TO PEOPLE-COUNT.
Fixed Code Sample
EVALUATE MARITAL-CODE
WHEN "M"
PERFORM FIND-PARENT
ADD 2 TO PEOPLE-COUNT
WHEN "S"
WHEN "D"
WHEN "W"
ADD 1 TO PEOPLE-COUNT
END-EVALUATE
Reference
IBM Enterprise Cobol for z/OS - Language Reference
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.