IBM AS/400 Frozen Dessert Maker User Manual


 
Managing Activation Groups
If you create an ILE RPG program with ACTGRP(*NEW), you can then call the
program as many times as you want without returning from earlier calls. With
each call, there is a new copy of the program. Each new copy will have its own
data, open its files, etc.. However, you must ensure that there is some way to
end the calls to 'itself'; otherwise you will just keep creating new activation
groups and the programs will never return.
*CALLER
The program or service program will be activated into the activation group of
the calling program. If an ILE program created with ACTGRP(*CALLER) is
called by an OPM program, then it will be activated into the OPM default acti-
vation group (*DFTACTGRP).
Running in the OPM Default Activation Group
When an OS/400 job is started, the system creates an activation group to be used
by OPM programs. The symbol used to represent this activation group is
*DFTACTGRP. You cannot delete the OPM default activation group. It is deleted by
the system when your job ends.
OPM programs automatically run in the OPM default activation group. An ILE
program will also run in the OPM default activation group when one of the following
occurs:
The program was created with DFTACTGRP(*YES) on the CRTBNDRPG
command.
The program was created with ACTGRP(*CALLER) at the time of program cre-
ation and the caller of the program runs in the default activation group. Note
that you can only specify ACTGRP(*CALLER) on the CRTBNDRPG command
if DFTACTGRP(*NO) is also specified.
Note: The resources associated with a program running in the OPM default acti-
vation group via *CALLER will not be deleted until the job ends.
Maintaining OPM RPG/400 and ILE RPG Program Compatibility
If you have an OPM application that consists of several RPG programs, you can
ensure that the migrated application will behave like an OPM one if you create the
ILE application as follows:
1. Convert each OPM source member using the CVTRPGSRC command, making
sure to convert the /COPY members.
See “Converting Your Source” on page 382 for more information.
2. Using the CRTBNDRPG command, compile and bind each converted source
member separately into a program object, specifying DFTACTGRP(*YES).
For more information on OPM-compatible programs. refer to “Strategy 1:
OPM-Compatible Application” on page 23.
Chapter 9. Running a Program 111