Sign in

docs ILE Concepts

Program Activation Creation

Program Activation Creation

Program Activation Creation

ILE manages the process of program activation by keeping track of program activations within an activation group. Refer to Activation Group for a definition of an activation group. Only one activation for a particular program object is in an activation group. Programs of the same name residing in different libraries are considered different program objects when this rule is applied.

When you use a dynamic program call statement in your HLL program, ILE uses the activation group that was specified when the program was created. This attribute is specified by using the activation group (ACTGRP) parameter on either the Create Program (CRTPGM) command or the Create Service Program (CRTSRVPGM) command. If a program activation already exists within the activation group indicated with this parameter, it is used. If the program has never been activated within this activation group, it is activated first and then run. If there is a named activation group, the name can be changed with the ACTGRP parameter on the UPDPGM and UPDSRVPGM commands

Once a program is activated, it remains activated until the activation group is deleted. As a result of this rule, it is possible to have active programs that are not on the call stack. Figure 1 shows an example of three active programs within an activation group, but only two of the three programs have procedures on the call stack. In this example, program A calls program B, causing program B to be activated. Program B then returns to program A. Program A then calls program C. The resulting call stack contains procedures for programs A and C but not for program B. For a discussion of the call stack, see Call Stack.

Figure 1. Program May Be Active But Not on the Call Stack