On 14/04/2009, at 7:15 PM, David FOXWELL wrote:
I was asking as I was considering *NEW instead of a named group, as
I don't know the name of the group to reclaim after execution. I
stumbled across rclactgrp *eligible that seems to do what I need.
Be VERY careful using *ELIGIBLE especially in a production
environment. You will kill any user activation group that currently
does not have active programs or procedures. If a procedure is using
the activation group to retain state (a common, intended, and
desirable use of activation groups) you will have a, possibly
unfavourable, learning experience.
If you know the name of the program you called you can retrieve the
name of its activation group using the Retrieve Program Information
(QCLRPGMI) API.
Just one thing, the help after execution of rclactgrp *eligible
states :
ID message . . . . . . : CPC0912
.. The activation groups were deleted because they were not active
and the job was not in debug mode..
However, I am in debug mode. Am I misunderstanding something here?
This refers to the debug activation groups (i.e., those related to the
debug function itself). These cannot be reclaimed while debug is
active but they can be once debug is ended.
*ELIGIBLE will only reclaim eligible activation groups. To be
considered eligible the activation group must satisfy all the
following criteria:
o not one of the default activation groups
o no programs in the activation group are on the call stack
o not one of the debug activation groups (e.g., QTESAGRP, QTESGUI,
etc.)
o not a shared activation group
Although the system considers a given activation group eligible to be
reclaimed your application may have a different idea. Even if it does
not now it may do so in the future. Using *ELIGBLE in any environment
except your own interactive job during development is a bad idea.
Search the archives for related discussions.
Regards,
Simon Coulter.
--------------------------------------------------------------------
FlyByNight Software OS/400, i5/OS Technical Specialists
http://www.flybynight.com.au/
Phone: +61 2 6657 8251 Mobile: +61 0411 091 400 /"\
Fax: +61 2 6657 8251 \ /
X
ASCII Ribbon campaign against HTML E-Mail / \
--------------------------------------------------------------------
As an Amazon Associate we earn from qualifying purchases.