rspec/rules/S2797/rpg/rule.adoc

46 lines
1.1 KiB
Plaintext
Raw Normal View History

== Why is this an issue?
2021-04-28 16:49:39 +02:00
The use of positional notation to describe the overlapping of one field on another can quickly become confusing, particularly in large, or complicated data structures. Instead, the ``++OVERLAY++`` keyword should be used to make such overlaps more readily identifiable.
=== Noncompliant code example
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,rpg]
2021-04-28 16:49:39 +02:00
----
D Message DS QUALIFIED
D Id 7
* Noncompliant
D Type 1 3
----
=== Compliant solution
2021-04-28 16:49:39 +02:00
2022-02-04 17:28:24 +01:00
[source,rpg]
2021-04-28 16:49:39 +02:00
----
D Message DS QUALIFIED
D Id 7
D Type 3 OVERLAY(Id)
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Replace this positional notation with the "OVERLAY" keyword.
'''
== Comments And Links
(visible only on this page)
=== on 2 Apr 2015, 18:54:52 Ann Campbell wrote:
http://www.bmeyers.net/faqs/14-tips/32-rpg-iv-style?start=3
endif::env-github,rspecator-view[]