rspec/rules/S2793/rpg/rule.adoc

63 lines
1.6 KiB
Plaintext

``++QUALIFIED++`` data structures result in cleaner code because you can't reference the fields without using the qualifying name. They also allow you to have multiple sub-fields with the same name, meaning subfield names don't have to be convoluted for uniqueness, and can be expressive instead.
== Noncompliant Code Example
----
* Noncompliant
D Employee DS
D EmpId 7P 0
D EFName 30A
D ELName 30A
D EPhone 11P 0
* Noncompliant
D Contractor DS
D CntId 7P 0
D CFName 30A
D CLName 30A
D CPhone 11P 0
/free
EmpId = '000220';
/end-free
----
== Compliant Solution
----
D Employee DS QUALIFIED
D Id 7P 0
D FName 30A
D LName 30A
D Phone 11P 0
D Contractor DS QUALIFIED
D Id 7P 0
D FName 30A
D LName 30A
D Phone 11P 0
/free
Employee.Id = '000220';
/end-free
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]