We have applied the COBOL fixes for September, and now the optimizer
"discarded" messages are appearing in the compiler output. The format and
message identifier has changed.
COBOL 4.2:
IGYOP3091-W Code from "procedure name 300-PROCESS" to "EXIT (line 155.01)"
can never be executed and was therefore discarded.
COBOL 5.1:
IGYCB7300-W The code from lines 105.1 - 106.1, 109.1, 110.1 - 111.1, 112.1,
115.1, 116.1 - 117.1, 117.1, 119.1 - 122.1,
122.1, 125.1 - 126.1 in program 'MAKEEX' can never be executed and was
therefore discarded.
IGYCB7300-W The code from lines 126.1, 127.1 - 129.1, 129.1 - 130.1, 135.1,
136.1, 139.1 - 141.1, 141.1, 146.1 - 147.1,
147.1, 148.1 in program 'MAKEEX' can never be executed and was
therefore discarded.
IGYCB7300-W The code from lines 149.1, 152.1 - 154.1, 154.1, 155.1 in program
'MAKEEX' can never be executed and was therefore discarded.
As the code snippet below shows, COBOL 4.2 would throw out everything after
"STOP RUN". COBOL 5.1 only discards the statements on the "SL" lines. (I've
forgotten what "SL" means in COBOL.. I am no programmer...)
LineID PL SL ----+-*A-1-B--+----2----+----3----+----4----+----5
000100 STOP RUN.
000101
000102 300-PROCESS.
000103
000104 IF END-OF-FILE
000105 1 MOVE "YES" TO END-OF-BUILD
000106 1 GO TO 300-EXIT
000107 END-IF.
IBM support was not helpful in letting us know which of the PTFs from September
fixed the issue.
HTH,
Greg Shirey
Ben E. Keith Company
On Friday, October 3, 2014, Tom Ross said:
COBOL V5 optimization definitely removes unreachable code, but it is so
different from the V4 optimizer that it may report differently. In fact,
in the early days (of developing COBOL V5) we were getting messages for
deleted code at OPT(0), which we have since corrected (we no longer delete
code at OPT(0))
The COBOL V3/V4 optimizer did not always report unreachable code deletion,
but we are interested in cases where V4 flagged it and V5 does not, so
please open PMRs if you find such cases!
Cheers,
TomR >> COBOL is the Language of the Future! <<
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN