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



Yes to call a ILE RPG *PGM recursively, you have to have use
ACTGRP(*NEW)...unless you're on 6.1.

Note that for example ILE C *PGMs have always supported recursion.

If I need a recursive *PGM, say for example a trigger program, instead
of using ACTGRP(*NEW) I'll put an ILE C wrapper around RPGLE procedure
calls.

HTH,
Charles




On Mon, Jun 15, 2009 at 10:21 AM, Bryce Martin<BMartin@xxxxxxxxxxxx> wrote:
Charles,

It must be the recursion of PGMs that I am thinking of then.


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



Charles Wilt <charles.wilt@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
06/15/2009 09:59 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.






Bryce,

You are mistaken.

RPGLE Sub procedures have always supported recursion without the
ACTGRP(*NEW).

Charles

On Mon, Jun 15, 2009 at 9:49 AM, Bryce Martin<BMartin@xxxxxxxxxxxx> wrote:
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
--
This is the RPG programming on the IBM i / System i (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 message (including any attachments) is intended only for the
use of the individual or entity to which it is addressed and may contain
information that is non-public, proprietary, privileged, confidential, and
exempt from disclosure under applicable law. If you are not the intended
recipient, you are hereby notified that any use, dissemination,
distribution, or copying of this communication is strictly prohibited. If
you have received this communication in error, please notify us and
destroy this message immediately. ---
--
This is the RPG programming on the IBM i / System i (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 is the RPG programming on the IBM i / System i (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 message (including any attachments) is intended only for the use of the individual or entity to which it is addressed and may contain information that is non-public, proprietary, privileged, confidential, and exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any use, dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us and destroy this message immediately. ---
--
This is the RPG programming on the IBM i / System i (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 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.