rspec/rules/S1729/cobol/rule.adoc

34 lines
786 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
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.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
2022-02-04 17:28:24 +01:00
[source,cobol]
2021-04-28 16:49:39 +02:00
----
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[]