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



Charles, the recursive "program" as I called it is already set up that
way. Its a subprocedure inside of a program wrapper that is compile as AG
*New. I don't think you can have a recursive call any other way on V5R4.
You can't do recursion w/o the AG *New. And you can only code *PGM
objects with AG *New. So the wrapper setup is already a requirement. I
could make the outward facing program that is called by the OPM program AG
*New, but that is a performance beast.


Thanks
Bryce Martin
Programmer/Analyst I
570-546-4777



Charles Wilt <charles.wilt@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
06/15/2009 09:37 AM
Please respond to
RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>


To
"RPG programming on the IBM i / System i" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
Re: Reclaiming Activation Groups.






On Mon, Jun 15, 2009 at 9:15 AM, Mark S.
Waterbury<mark.s.waterbury@xxxxxxx> wrote:

My project structure looks like this...

OPM Program calls RPGLE Program that has a named Activation Group -->
RPGLE Pgm calls modules in a service program. --> Module in Service
Program calls RPGLE Pgm with Activation *New (recursive BOM)

If I change the recursive BOM program and recompile I don't see the
changes until I reclaim activation group of the RPGLE Pgm that is in
the
Named activation group.

With ACTGRP(*NEW), that program should be automatically deactivated and
the *NEW AG gets reclaimed whenever that program returns.

Note that using ACTGRP(*NEW) in this way is not currently recommended.
The performance penalty is significant.

RPG IV supports recursive procedures. Consider moving the logic from
the RPGLE program into a procedure. Basically the RPGLE program would
become simply a wrapper that provides a way to call the procedure from
the command line as in this case, an OPM program.

Of course, if you do take my advice, then you'd indeed have the
problem you think you do :)

Consider making the RPGLE wrapper ACTGRP(*NEW) so that the users just
need to exit out of the program to get the latest. version.
Otherwise, just have them sign off and back on.

Charles

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.