|
Joe, Here's an idea, it follows some assumptions but you may be interested: 1. You'll need a "global" /copy. I have one /copy that I include in all my code. By doing so, I have in essence "extended" RPG with my procedures and constants. This is, of course, just a convention but it works great for me. And you could have as many of these "global" /copys as you want, but instead I put any necessary /copy statements inside my one global. The caveat here is that SQLRPGLE does not allow nested /copy statements. * A little more on the global /copy idea: I actually break this down into two approaches. The first is global like it sounds, all code that I write uses this /copy. The second is by application: I have application wide /copy statements as well that only include things necessary to that application. You can even include the "global" global /copy in the "application" global is you want to limit the number of /copy statement in your application code. So you can pick at what level your "global" would apply. :-) 2. You'll need a REF file or data dictionary. 3. Add the external DS to your global /copy. Now prefix it with something like 'ref_': d myREF e ds extname(MYREF) prefix(ref_) 4. If you follow this convention, then you could always reference the definition of any field in your DB. This could be really handy in lots of scenarios. The name collision problem would be reduced but you would still have to be diligent not to prefix anything else with (ref_). Maybe you could add qualified and double your protection? I assume that would work although I've never tried it. d SccIOKWClear pr d ID like( myref.ref_KWDFID ) value d Format like( myref.ref_KWFMT ) value Your e-mail made me think of this: I may have to try this in my next application. Joel http://www.rpgnext.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.