rspec/rules/S2033/rpg/rule.adoc

31 lines
675 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
Because library names could change from environment to environment, they should never be hard-coded in a program. Instead, you should use a variable to specify the library name and set that variable with data external to the program.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
CLRPFM FILE(XPJLIB/FILE01)
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
CHGVAR VAR(&LIB01) VALUE(&PREFIX *CAT 'LIB')
CLRPFM FILE(&LIB01/FILE01)
----
2021-04-28 16:49:39 +02:00
== Exceptions
Hard-coding references to QTEMP, which is a temporary library, is allowed.
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]