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



Scott,

I don't think Mark is hung up, just asking for clarification....as am I.

You said, "reclaiming TRYAG1" I was thinking that was a typo and you
meant "reclaiming TRGAG2"

ie. you could code TRYAG1 like so:

*> CRTRPGMOD TRYAG1 SRCFILE(QRPGLESRC) DBGVIEW(*LIST)
*> CRTPGM TRYAG1 BNDSRVPGM(TRYAG2) ACTGRP(TRYAG1)
D tryag2 pr
/free
monitor;
tryag2();
on-error;
//TRYAG2 activation group destroyed need to reclaim
system('rclactgrp TRYAG2');
endmon;

//now this doesn't fail
tryag2();
*inlr = *on;
/end-free

But a quick test show that it doesn't work....

Another quick test shows confirm my recollection that you can't
reclaim the activation group you are in...

So you'd have to have
TRYAG0
TRYAG1
TRYAG2

If TRYAG2 blew up, TRYAG0 would have to know to do the reclaim of TRYAG1.

Charles

On Thu, Oct 7, 2010 at 2:35 PM, Scott Klement <rpg400-l@xxxxxxxxxxxxxxxx> wrote:
Mark, I suggested several possibilities.  You seem to be hung up on just
one of them...   if that's the case, try a different one.

There may be apps where it makes sense to reclaim the calling activation
group.  If yours isn't one of them, just use a different solution.


On 10/7/2010 12:53 PM, Mark Murphy/STAR BASE Consulting Inc. wrote:
<snip>
You could solve the problem by reclaiming the TRYAG1 activation group
(this'll cause the pointer to be reset), or by handling the procedure
pointer logic manually in your program.
</snip>

And just how do you do that between the calls to TRYAG2?  TRYAG1 must stay active the whole time.

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