62 lines
1.1 KiB
Plaintext
62 lines
1.1 KiB
Plaintext
== Why is this an issue?
|
|
|
|
include::../description.adoc[]
|
|
|
|
=== Exceptions
|
|
|
|
Literals with fewer than 7 characters are ignored.
|
|
|
|
Only duplications located in a `PROCEDURE DIVISION`, not those contained in copybooks are reported.
|
|
|
|
== How to fix it
|
|
|
|
include::../howtofix.adoc[]
|
|
|
|
=== Code examples
|
|
|
|
==== Noncompliant code example
|
|
|
|
With the default threshold of 3:
|
|
|
|
[source,cobol,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
PROCEDURE DIVISION.
|
|
|
|
DISPLAY "Firstname: ".
|
|
*...
|
|
DISPLAY "Firstname: ".
|
|
*...
|
|
DISPLAY "Firstname: ".
|
|
----
|
|
|
|
==== Compliant solution
|
|
|
|
[source,cobol,diff-id=1,diff-type=compliant]
|
|
----
|
|
WORKING-STORAGE SECTION.
|
|
01 FIRST-NAME-HEADER PIC X(42) VALUE "Firstname: ".
|
|
PROCEDURE DIVISION.
|
|
|
|
DISPLAY FIRST-NAME-HEADER
|
|
*...
|
|
DISPLAY FIRST-NAME-HEADER
|
|
*...
|
|
DISPLAY FIRST-NAME-HEADER
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
include::../parameters.adoc[]
|
|
|
|
include::../highlighting.adoc[]
|
|
|
|
'''
|
|
|
|
endif::env-github,rspecator-view[]
|