|
Hi Kurt, <snip> In regard to the Export/Import feature, maybe if IBM allowed us to specify the Const keyword along with the Export keyword, then subsequent modules would have access to the value w/o being able to change it (much like procedure calls). </snip> I suppose that would be nice. It would give us the ability to have read-only access to data items in other modules. I suppose the benefit there would be the fact that the import/export is still within the program object. I can't imagine that it would be easy to do though. The data in all copies would have to be updated every time the value was changed in the originating module. This is easy when each import simply references the address of the export. Not so easy when they're all copies. <snip> While I have used encapsulation, I think if the Export/Import feature were further expanded upon, it'd be a really nice tool. </snip> The use of data item imports/exports AND encapsulation via sub-procs could hold a partial solution: You could have a scenario where you can import/export your data items accross modules within the same (service) program object, but not beyond. Then, for all data items that need to be exported beyond the service program object you would create getter sub-procs. You know, I'm still not sure about the idea of modules exporting data items, even to other modules within the same program object. It seems to me that modules should be re-usable, and having a module that has explicit imports from other modules seems to fly in the face of that. However, I am willing to be convinced. I mean, I can see the use of generic imports in a utility module, that allows the behaviour of the module to change depending upon the other modules it is bound to (resolving it's imports to a variety of module exports). Maybe the real solution would be the ability to specify the level of export for a sub-proc or data item. Something like: EXPORT - the current value, and the default EXPORT(*PGM) EXPORT(*SRVPGM) EXPORT(*ACTGRP) EXPORT(*JOB) EXPORT(*BND) - same as EXPORT Hmmm... Food for thought. Larry Ducie
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.