IBM AS/400 Frozen Dessert Maker User Manual


 
Managing Activation Groups
Deleting an Activation Group
When an activation group is deleted, its resources are reclaimed. The resources
include static storage and open files. A *NEW activation group is deleted when the
program it is associated with returns to its caller.
Named activation groups (such as QILE) are
persistent
activation groups in that
they are not deleted unless explicitly deleted or unless the job ends. The storage
associated with programs running in named activation groups is not released until
these activation groups are deleted.
An ILE RPG program created DFTACTGRP(*YES) will have its storage released
when it ends with LR on or abnormally.
Note: The storage associated with ILE programs running in the default activation
group via *CALLER is not released until you sign off (for an interactive job)
or until the job ends (for a batch job).
If many ILE RPG programs are activated (that is called at least once) system
storage may be exhausted. Therefore, you should avoid having ILE programs that
use large amounts of static storage run in the OPM default activation group, since
the storage will not be reclaimed until the job ends.
The storage associated with a service program is reclaimed only when the acti-
vation group it is associated with ends. If the service program is called into the
default activation group, its resources are reclaimed when the job ends.
You can delete a named activation group using the RCLACTGRP command. Use
this command to delete a nondefault activation group that is not in use. The
command provides options to either delete all eligible activation groups or to delete
an activation group by name.
For more information on RCLACTGRP refer to the
CL Reference (Abridged)
. For
more information on the RCLACTGRP and activation groups, refer to
ILE Concepts
.
Reclaim Resources Command
The Reclaim Resources (RCLRSC) command is designed to free the resources for
programs that are no longer active. The command works differently depending on
how the program was created. If the program is an OPM program or was created
with DFTACTGRP(*YES), then the RCLRSC command will close open files and
free static storage.
For ILE programs or service programs that were activated into the OPM default
activation group because they were created with *CALLER, files will be closed
when the RCLRSC command is issued. For programs, the storage will be re-
initialized; however, the storage will not be released. For service programs, the
storage will neither be re-initialized nor released.
Note: This means that if you have a service program that ran in the default acti-
vation group and left files open (returning with LR off), and a RCLRSC is
issued, when you call the service program again, the files will still appear to
be open, so so any I/O operations will result in an error.
For ILE programs associated with a named activation group, the RCLRSC
command has
no
effect. You must use the RCLACTGRP command to free
resources in a named activation group.
112 ILE RPG for AS/400 Programmer's Guide