70 lines
922 B
Plaintext
70 lines
922 B
Plaintext
== Why is this an issue?
|
|
|
|
Any statement after a ``++STOP RUN++`` or ``++GOBACK++`` is unreachable and therefore dead code which should be removed.
|
|
|
|
|
|
=== Noncompliant code example
|
|
|
|
[source,cobol]
|
|
----
|
|
PARAGRAPH1.
|
|
MOVE A TO B.
|
|
STOP RUN.
|
|
MOVE B TO C.
|
|
----
|
|
|
|
or
|
|
|
|
|
|
[source,cobol]
|
|
----
|
|
PARAGRAPH1.
|
|
MOVE A TO B.
|
|
GOBACK.
|
|
MOVE B TO C.
|
|
----
|
|
|
|
|
|
=== Compliant solution
|
|
|
|
[source,cobol]
|
|
----
|
|
PARAGRAPH1.
|
|
MOVE A TO B.
|
|
MOVE B TO C.
|
|
STOP RUN.
|
|
----
|
|
|
|
or
|
|
|
|
|
|
[source,cobol]
|
|
----
|
|
PARAGRAPH1.
|
|
MOVE A TO B.
|
|
MOVE B TO C.
|
|
GOBACK.
|
|
----
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
=== Message
|
|
|
|
This [STOP RUN|GOBACK] statement should be moved to the end of the statement sequence.
|
|
|
|
|
|
'''
|
|
== Comments And Links
|
|
(visible only on this page)
|
|
|
|
=== relates to: S1577
|
|
|
|
=== is related to: S1763
|
|
|
|
endif::env-github,rspecator-view[]
|