Rule Definition
In order to ease change, increase the program adaptability, and avoid specific information potential misuse, it is highly recommended not to use non-trivial alphanumeric literals in COBOL PROCEDURE DIVISION.
Remediation
Define variables initialized with alphanumeric literals and use these variables in the PROCEDURE DIVISION. If the literals are used by several programs, then the variables can be grouped in dedicated copybooks.
Moreover, you should also validate the use of literals in conditional statements such as IF or EVALUATE.
Violation Code Sample
IF THE-DATE = "2017/09/08"
...
END-IF
Fixed Code Sample
01 REF-DATE PIC X(10) VALUE "2017/09/08".
IF THE-DATE = REF-DATE
...
END-IF
Related Technologies
Technical Criterion
CWE-1052 - Excessive Use of Hard-Coded Literals in Initialization
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.