×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.





But in that case, when the program RETURNs control to the caller, does the
*NEW activation group end, or just become in-accessible, and just hang
around until the entire job ends?

A *NEW activation group ends as soon as the program that created it ends. So, if you compile your RPG program with ACTGRP(*NEW), the activation group (and everything in it) will be destroyed when your program does a RETURN (no matter if LR is on or off)

That's why everything gets cleaned up when you haven't turned LR on.

It's also why you shouldn't do it in a loop, because of the overhead of creating the activation group, opening the files, etc. For a program that will only be called a few times in a job, however, this cost isn't significant -- so only when it's in a loop (or for some reason is being called frequently) is it a really bad idea.


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