|
*INLR in any module that has NOMAIN specified on the header spec is treated just like indicator 7. That is *IN07 being on or off in that module when the parent program ends has no impact on anything. *INLR works the same way when NOMAIN is specified in the module. -Bob Cozzi -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Dane Cox Sent: Monday, January 10, 2005 3:13 PM To: RPG programming on the AS400 / iSeries Subject: RE: A different kind of persistence? Eric, Wow. That's interesting...and just a little disconcerting. What purpose does this serve? If I set on LR for the calling program, I would have certainly expected all bound modules to end at the same time. Man, I need to go back to the books on basic ILE I think. Let me ask one more thing. Will a service program behave the same way? Once it is used in the AG, will it persist? Thanks, Dane -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of DeLong, Eric Sent: Monday, January 10, 2005 2:12 PM To: 'RPG programming on the AS400 / iSeries' Subject: RE: A different kind of persistence? Dane, Your q: "Eric D. - yes, I think all of what you stated is accurate. Named activation group for all programs (*PGM objects) called from this job. However, some of your comments contradict those of Bob C's regarding the persistence of data. Does LR have no impact on global variables within an activation group...period, the end?" LR has impact within the scope of the module where it was set. In this case, you set LR in the MAIN module of your program, and not in the NOMAIN module. For the storage defined in the NOMAIN module to be re-initialized, you would need to seton LR before returning from that module. This sets a switch that causes global storage to be re-initialized on the next call. (Note that this has no effect on local static variables that are declared in the procedures.) Even though you are binding the module by copying it into your *PGM, the rules of activation group resource scoping are still at play. Once the module get started in the AG, it remains persistent until the job ends or the AG is reclaimed. Setting LR within the module does not cause resources to be reclaimed as they do in RPG/400. Eric DeLong Sally Beauty Company MIS-Project Manager (BSG) 940-898-7863 or ext. 1863 -- 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. NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. -- 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.
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.