rspec/rules/S1632/rpg/rule.adoc

52 lines
1.1 KiB
Plaintext
Raw Normal View History

== Why is this an issue?
2021-04-28 16:49:39 +02:00
Historically ``++/COPY++`` procedures contained all of the specifications required for each procedure, so for example ``++xxxxF /COPY++`` would be used to copy the F lines from another ``++F++`` spec. However, this practice results in code that is difficult to understand and maintain. Instead, the use of ``++/COPY++`` statements should be replaced with explicit declarations.
=== Noncompliant code example
2021-04-28 16:49:39 +02:00
Given the default list of specs, H,F,I,D,C,O:
2022-02-04 17:28:24 +01:00
[source,rpg]
2021-04-28 16:49:39 +02:00
----
F/COPY HRSILERPG,RSX36
----
=== 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
----
FSSINRTP IF E K DISK INFSR(*PSSR)
F*
F* Interest Rates File
F*
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Replace this ``++/COPY++`` directive with explicitly coded specifications
=== Parameters
.specs
****
----
H,F,I,D,C,O
----
Comma-delimited list of specs in which "/COPY" should not be used
****
endif::env-github,rspecator-view[]