View previous topic :: View next topic
|
Author |
Message |
rkprasanth_m
New User
Joined: 22 Jun 2006 Posts: 44
|
|
|
|
Is there any tools or compiler options to delete unused code and never called procedures in COBOL programs.
I mean I just want to cut the branch of a tree, and the clean-up of all sub-branches should be done automatically. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Automatically? I don't think so......
I do know that code that is not referenced or considered unreachable by the optimizer is not compiled...... |
|
Back to top |
|
|
rkprasanth_m
New User
Joined: 22 Jun 2006 Posts: 44
|
|
|
|
thank You..
Actually, I wanted it to be removed from source code. Anyway, does compiler listing displays unreachable code? |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
rkprasanth_m wrote: |
Actually, I wanted it to be removed from source code. |
Yes, I understood that.....
Quote: |
Anyway, does compiler listing displays unreachable code? |
I (vaguely) recall seeing I-type error messages, you could try a little test program and see if you can generate some.... |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
You can always check the cross reference listing of the compile step. If a paragraph is not referenced.
But then you have to deal with PERFORM THRU's and fall-thrus (from poor code).
suggest that before removing, you comment-out the code with comments as to why you are removing the code. |
|
Back to top |
|
|
|