The idea of eliminating unreferenced variables in COBOL record
declarations is of course absurd, and fulminations against it are at
best otiose.  It is always possible to construct quietist arguments
against change, any and all change; but this straw man is too
obviously so to very useful to careerist obstructionists.

We are left with working-storage and local-storage declarations for
variables that then go unused.  In many cases they were once used, but
maintenance changes have made them redundant.  In any case they may be
eliminated safely, and they should be when an occasion to do so
arises.  They are individually ugly; and they add to source-program
clutter, which is substantial in old COBOL programs.

Whether a major undertaking, a formal project or the like, for their
elimination is jusitified is another, very different question.  I
think not.  All optimizing compilers eliminate dead code, sequences of
instructions that can never be executed, and dead variables, which are
never referenced.

Some compilers and backends are better at these operations than
others.  The current IBM C/C++ and PL/I backend, for example, detects
almost all aliasing schemes and even reflects these 'obscured'
references in its XREF output.  The current COBOL compiler does a
modest but adequate job of this when full optimization is used.  There
is therefore almost no resource-savings argument to be made for a
campaign to eliminate unreferenced variables; and further
bureaucratization of this particular programming milieu is highly
undesirable.

John Gilmore, Ashland, MA 01721 - USA

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to