45 lines
765 B
Plaintext
45 lines
765 B
Plaintext
Most COBOL environments do not support recursive ``++PERFORM++`` calls, since they can cause unpredictable results. This rule raises an issue when recursive ``++PERFORM++`` calls are used.
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,cobol]
|
|
----
|
|
PARAGRAPH1.
|
|
PERFORM PARAGRAPH2.
|
|
|
|
PARAGRAPH2.
|
|
PERFORM PARAGRAPH3.
|
|
|
|
PARAGRAPH3.
|
|
PERFORM PARAGRAPH1.
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
[source,cobol]
|
|
----
|
|
PARAGRAPH1.
|
|
PERFORM PARAGRAPH2.
|
|
|
|
PARAGRAPH2.
|
|
PERFORM PARAGRAPH3.
|
|
|
|
PARAGRAPH3.
|
|
DISPLAY "THIS IS PARAGRAPH3".
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::message.adoc[]
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
include::comments-and-links.adoc[]
|
|
endif::env-github,rspecator-view[]
|