rspec/rules/S1283/cobol/rule.adoc

16 lines
401 B
Plaintext
Raw Normal View History

== Why is this an issue?
You should avoid opening a cursor inside a ``++PERFORM++`` statement because doing so could impact performance, or lead to unexpected behavior if the the closing of the cursor is not defined in the same loop.
=== Noncompliant code example
2022-02-04 17:28:24 +01:00
[source,cobol]
----
PERFORM UNTIL (NOT DA-OK) OR (Y00CIA-CD-RET-PGM = ZERO)
EXEC SQL OPEN C2
END-EXEC
END-PERFORM.
----