
Inline adoc files when they are included exactly once. Also fix language tags because this inlining gives us better information on what language the code is written in.
72 lines
1.7 KiB
Plaintext
72 lines
1.7 KiB
Plaintext
== Why is this an issue?
|
|
|
|
``++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
|
|
|
|
[source,rpg]
|
|
----
|
|
* 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
|
|
|
|
[source,rpg]
|
|
----
|
|
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)
|
|
|
|
=== Message
|
|
|
|
Mark this data structure "QUALIFIED".
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
=== on 2 Apr 2015, 17:28:40 Ann Campbell wrote:
|
|
http://www.bmeyers.net/faqs/14-tips/32-rpg-iv-style?start=3
|
|
|
|
endif::env-github,rspecator-view[]
|