|
On 06/03/2006, at 11:56 AM, Mike Pantzopoulos - (H/O) wrote:
I'm a little unclear about one aspect of ILE. Consider the following: A procedure can be bound by reference or copy. If it's by copy then the executable code for the procedure is actually part of the program build. However the procedure is itself part of a module which may have module level declaration (files/variables). It's this module level stuff I'm unclear about. When the procedure is bound by copy, where is the module level stuff kept?
You don't bind procedures. You bind modules. The entire module is copied into the target program or service program.
Does an area of the executable get kept aside for these variables?
Yes.
What about the file declaration in the module?
What about it? The storage associated with a file is global to the module.
Are there any problems with the same file being declared in the calling program?
Not generally. The calling program is itself a module (or started out that way). The storage for each file in each module is generally separate. You can probably stuff things up with EXPORT and IMPORT.
If more than one procedure is bound from the same module is there only one set of module level memory set aside?
Binding to a module makes ALL procedures in that module available. Static storage is scoped to the module. Automatic storage is scoped to the procedure. Using EXPORT and IMPORT on a data item changes things slightly regarding where ownership of the storage is vested.
Sorry for being a little vague about it. It's just that I haven't encountered any commentary on these sorts of questions.
Read the ILE Concepts manual. All the stuff you need to care about is discussed there.
Regards, Simon Coulter. -------------------------------------------------------------------- FlyByNight Software AS/400 Technical Specialists http://www.flybynight.com.au/ Phone: +61 3 9419 0175 Mobile: +61 0411 091 400 /"\ Fax: +61 3 9419 0175 \ / X ASCII Ribbon campaign against HTML E-Mail / \ --------------------------------------------------------------------
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.