|
I'll throw out a suggestion just for terminology sake. I prefer to call
module-level declarations, "module-level declarations", as opposed to
"procedure-level declarations", and rather than "global declarations". To me a
global declaration would be something that might be shared across an entire
activation group, which might include any number of programs and service
programs in a call stack. Say you export a data structure from a service
program, for example, which is intended to be shared across an entire activation
group. That's a lot more global than "module-level" declarations.
-Nathan.
----- Original Message ----
From: Vern Hamberg<vhamberg@xxxxxxxxxxx>
To: RPG programming on the IBM i / System i<rpg400-l@xxxxxxxxxxxx>
Sent: Thu, November 11, 2010 8:46:08 AM
Subject: More on global declarations in RPG IV
In a recent thread, there was some question about global variables,
etc., when using the MAIN control keyword. I had mentioned that some
things still must be global. I believe that one of them is compile-time
arrays. If you want to find all the messages that deal with "global",
here's a way to do that -
Execute the following command -
DSPMSGD RANGE(*ALL) MSGF(QDEVTOOLS/QRPGLEMSG) DETAIL(*FULL) OUTPUT(*PRINT)
Then you can search for 'lobal' in the spooled file - this covers
possible upper- or lower-case "G" in the word "global"
So have fun. And I did find, in the RPG ILE Reference, this note about
CTDATA, footnote 2
This keyword applies only to global definitions.
Random musings while on vacation! I know, I'm rubbing it in!
Vern
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.