IBM AS/400 Frozen Dessert Maker User Manual


 
Managing Activation Groups
programs activated within one activation group are developed as one cooperative
application.
You identify the activation group that your ILE program will run in at the time of
program creation. The activation group is determined by the value specified on the
ACTGRP parameter when the program object was created. (OPM programs always
run in the default activation group; you cannot change their activation group specifi-
cation.) Once an ILE program (object type *PGM) is activated, it remains activated
until the activation group is deleted.
The remainder of this section tells you how to specify an activation group and how
to delete one. For more information on activation groups, refer to
ILE Concepts
.
Specifying an Activation Group
You control that activation group your ILE program will run in by specifying a value
for the ACTGRP parameter when you create your program (using CRTPGM or
CRTBNDRPG) or service program (using CRTSRVPGM).
Note: If you are using the CRTBNDRPG command, you can only specify a value
for ACTGRP if the value of DFTACTGRP is *NO.
You can choose one of the following values:
a named activation group
A named activation group allows you to manage a collection of ILE programs
and service programs as one application. The activation group is created when
the first program that specified the activation group name on creation is called.
It is then used by all programs and service programs that specify the same
activation group name.
A named activation group ends when it is deleted using the CL command
RCLACTGRP. This command can only be used when the activation group is no
longer in use. When it is ended,
all
resources associated with the programs
and service programs of the named activation group are returned to the
system.
The named activation group QILE is the default value of the ACTGRP param-
eter on the CRTBNDRPG command. However, because activation groups are
intended to correspond to applications, it is recommended that you specify a
different value for this parameter. For example, you may want to name the acti-
vation group after the application name.
*NEW
When *NEW is specified, a new activation group is created whenever the
program is called. The system creates a name for the activation group. The
name is unique within your job.
An activation group created with *NEW always ends when the program(s) asso-
ciated with it end. For this reason, if you plan on returning from your program
with LR OFF in order to keep your program active, then you should not specify
*NEW for the ACTGRP parameter.
Note: This value is not valid for service programs. A service program can only
run in a named activation group or the activation group of its caller.
*NEW is the default value for the ACTGRP parameter on the CRTPGM
command.
110 ILE RPG for AS/400 Programmer's Guide