Can someone please recommend a tool for analyzing, improving, finding "dead code", provide statistics etc. for a source code on COBOL language on VMS/VAX OS and RDB Database?
Thanks.
Can someone please recommend a tool for analyzing, improving, finding "dead code", provide statistics etc. for a source code on COBOL language on VMS/VAX OS and RDB Database?
Thanks.
Some compilers have options for locating dead code, so you may already have the tools you desire. Please keep in mind that there are going to be situations where the code is dead and you cannot tell via static source code analysis.
if a = 1
move 'error' to out-message
end-if
If a
can never be 1 then this is dead code. Static source code analysis may not find more complicated instances of this scenario, particularly if the value of a
comes from outside the program being analyzed - perhaps a database.
A cursory scan of the static source code analysis tools listed on Wikipedia shows the commercial products are pricy (thousands of euros). The open source tools don't appear to provide much COBOL coverage. You might want to check those out for yourself as I admit I didn't do a thorough evaluation but instead just scanned their documentation.
COBOL is a difficult language to parse.
I have never used it, but the DecSet suite of products includes a product called PCA - Performance and Coverage Analyser. This may be what you are looking for.