rspec/rules/S1622/rpg/rule.adoc

39 lines
1013 B
Plaintext
Raw Normal View History

== Why is this an issue?
2021-04-28 16:49:39 +02:00
Using a unique symbolic ``++PLIST++`` name provides a single definition point for the parameters used by any external routine being called. This ensures that the same information is passed every time the external routine is called, reducing the potential for mistakes in operation.
This rule flags non-compliant instances of ``++CALL++`` and ``++CALLB++``.
=== 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
----
C CALLB(D) 'XR01'
C PARM WSXR07
C PARM WSFLD1
----
=== 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
----
C P0XR07 PLIST
C PARM WSXR07
C PARM WSFLD1
C CALLB 'XR07' P0XR07
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
endif::env-github,rspecator-view[]