× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Yeah, this seems like an obvious solution to me. I know most people hate
the idea of data exports, but I use them quite a bit, but that's probably
because I'm used the PL/I where you can define variables as EXTERNAL, which
is effectively the same thing.

In fact, I have one RPGLE module which allocates memory for a
data-structure and exports that pointer to that data-structure. Rather like
various IBM API's, the first 10 characters in the data-structure specify
the format of the contents of the data-structure. Other procedures import
that pointer and have their own data-structure based over the pointer,
depending on the format. It all works very well.

That being said, I would have preferred the option that if a variable is
defined as IMPORT, then it is read-only. I think that would have made it a
much more 'accepted' mechanism...

On Fri, Mar 16, 2012 at 8:22 AM, Buck <kc2hiz@xxxxxxxxx> wrote:

Aside from aesthetics, does it really matter if you randomly choose the
one procedure to own the storage for this DS? That is, pick one
procedure to be labelled EXPORT and make the rest IMPORT. The compiler
will let any IMPORT procedure update/read the DS, won't it?
--buck


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.