Rory;
In my environment I couldn't do that, never know when a module would need to be re-compiled. The re-compile would fail and the person who changed the copybook in this way would catch heck.
I would either have the constant defined twice (long name and short name) or I would copy the old member to the QRPGCBSRCD (Depreciated RPG Copy Book file). Create a new copybook member, "evolve" the old copybook as needed, add a conditional /Include of the depreciated copybook, and the appropriate /Define to the module(s)
When we have down time this is one of the Never Ending Projects that gets some cycles thrown at it.
Duane Christen
--
Duane Christen
Senior Software Engineer
(319) 790-7162
Duane.Christen@xxxxxxxxxx
Visit PAETEC.COM
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Rory Hewitt
Sent: Friday, September 03, 2010 12:45 PM
To: RPG programming on the IBM i / System i
Subject: Re: Does the recommendation against variable names starting with SQL apply to constants?
Duane,
My solution to this is to change only the copybook (and include a comment to the effect that 'X0' has been changed to a new value) and the program that I'm compiling. When other programs that use the old cX0 are recompiled they will fail and the developer will figure out what happened and change that program. Hopefully they will know where cX0 is defined and will go there and see that it was previously changed.
Or not... :)
Rory
On Fri, Sep 3, 2010 at 10:34 AM, Christen, Duane
<Duane.Christen@xxxxxxxxxx>wrote:
I think, and I may be wrong here, but the reason that David added the
long named constant instead of replacing it, was that the constant was
defined in a copy book and used in multiple modules. Which may make it
a non-trivial task to replace the cXO constant name with the long name.
Duane Christen
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.
As an Amazon Associate we earn from qualifying purchases.