View previous topic :: View next topic
|
Author |
Message |
mitha
New User
Joined: 01 Dec 2021 Posts: 19 Location: India
|
|
|
|
Code from "procedure name XXXX" to "YYYY" can never
be executed and was therefore discarded. It is showing as warning in my cobol program. And the RC status is 04. Can anybody share what to do for this to not show this warning in my program. I couldn't able to view my output in spool. Please anyone share your thoughts. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
I assume it’s compilation warnings , Either Delete unwanted code or live with it . I would choose to delete unwanted , dead code. Moved to Students section. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
A previous developer may have wanted to disable a functionality but retain the code for possible future use.
If so, s/he did it in a very sloppy way.
Better would be to comment it out with a suitable explanation.
OR -
The code is in fact intended to be executable, but erroneously cannot be reached, so the program is not meeting its (presumed) specs. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
The message means EXACTLY what it says -- a block of code lines cannot be executed and hence is not generating code in the load module for it. This could be deliberate, or it could be an accident. Since you have complained about no SYSOUT being generated, I suspect it is an accident. Ways this could happen by accident include:
- misplaced period
- PERFORM or GOTO coded wrong
- IF statement conditional is not conditional (that is, it is always true or false and hence one branch of the IF/THEN/ELSE statement could not be executed)
- improperly commented code (such as commenting out a statement that causes the block of code to be executed)
There are other possibilities, but those are certainly the most likely ones. In any case, the way you resolve this is to start reviewing the code looking for why the block of code is not executable. This is not something anyone on this (or any) forum can do for you -- we don't have your source code. |
|
Back to top |
|
|
|