rspec/rules/S3573/cobol/rule.adoc

29 lines
945 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
Because statically-called programs must be relinked before they reflect changes in the code, it makes sense to prefer dynamic calls instead. Further, since statically-called programs are included in the caller's load module, those modules could require more main storage than if the calls were dynamic, and the called programs could reside in memory multiple times - one for each caller.
While static calls are faster, their other disadvantages make dynamic calls the preferred method. Thus, this rule raises an issue when the program to ``++CALL++`` is hard-coded, rather than specified in a variable.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
CALL 'MYPRGM01' USING PARAM1. *> Noncompliant
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
77 PRGM-NAME PIC X(8) VALUE 'MYPRGM01'.
[...]
CALL PRGM-NAME USING PARAM1.
----
ifdef::rspecator-view[]
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::rspecator-view[]