× 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.



Joe,

does a CRTBNDRPG program count as a bound module then?

cheers
Colin.W

----- Original Message ----- 
From: "Joe Pluta" <joepluta@xxxxxxxxxxxxxxxxx>
To: "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
Sent: Tuesday, April 13, 2004 4:35 PM
Subject: RE: More ILE 101


> > From: Joel Cochran
> >
> > Instead of having fifty copys of
> > the service programs and hence its global variables, then there is
> just
> > one copy that gets accessed from fifty different places.  The
> appearance
> > is that the global variable is shared, but in reality it is the
> > activation group that is shared.
>
> Hm.  This is counter to what I always understood.  In my understanding,
> there were two different pieces to any program: the code and the data.
> While each job got its own data portion, the code portion was shared,
> the caveat being you had to be in the same memory pool.
>
> So, if 20 jobs in QINTER ran the same order entry program, all 20
> programs would share the same copy of the code portion of the program.
> They would just have their own copy of the data portion in their PAG.
>
> It was thus fairly easy to implement re-entrancy by simply allowing
> multiple copies of the data portion.  Unfortunately, RPG had some
> limitation on re-entrancy that I never quite understood, but CL programs
> could call themselves and each call level would have its own data
> portion in the PAG.
>
> Activation groups can be use to get around the re-entrancy issue with
> RPG.   With *NEW, each call to the RPG program sets up its own data
> group, and thus there are no recursion issues.  But there aren't
> multiple copies of the program code, just of the data portion.
>
> Now, there ARE problems if you use bound modules.  If four programs in
> your program stack use the same bound module, then the code for that
> module is repeated four times.  That's a different issue, but it's
> probably one of the most important reasons for moving from bound modules
> to service programs.
>
> Joe
>
> _______________________________________________
> This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
> To post a message email: RPG400-L@xxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
> or email: RPG400-L-request@xxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at http://archive.midrange.com/rpg400-l.
>
>


This e-mail has been sent by a company of Bertram Group Ltd, whose registered 
office is The Nest, Rosary Road Norwich NR1 1TF. 
This message, and any attachments, are intended solely for the addressee and 
may contain privileged or confidential information.  If you are not the 
intended recipient, any disclosure, copying, distribution or any action taken 
or omitted to be taken in reliance on it, is prohibited and may be unlawful.  
If you believe that you have received this email in error, please contact the 
sender immediately. Opinions, conclusions and statements of intent in this 
e-mail are those of the sender and will not bind a Bertram Group Ltd company 
unless confirmed in writing by a director independently of this message. 
Although we have taken steps to ensure that this email and any attachments are 
free from any virus, we advise that in keeping with good computing practice the 
recipient should ensure they are actually virus free.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.