rspec/rules/S1729/cobol/rule.adoc
2022-02-04 16:28:24 +00:00

34 lines
786 B
Plaintext

Using more than one ``++OF++`` clause to access a data item can quickly decrease the readability of the source code. Either some ``++OF++`` clauses are optional and should be removed, or there are too many intersections between several data structures and those intersections should be removed.
== Noncompliant Code Example
[source,cobol]
----
01 EMPLOYEE.
05 MOTHER-IN-LAW.
10 NAME PIC X(20).
05 FATHER-IN-LAW.
10 NAME PIC X(20).
...
01 CUSTOMER.
05 MOTHER-IN-LAW.
10 NAME PIC X(20).
05 FATHER-IN-LAW.
10 NAME PIC X(20).
...
MOVE MY_VALUE TO NAME OF MOTHER-IN-LAW OF CUSTOMER
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
endif::env-github,rspecator-view[]