Activation Groups - IBM-ILE

After successfully creating an ILE C/C++ program, you can run your code. Activation is the process of getting an ILE C/C++ program or service program ready to run. When an ILE C/C++ program is called, the system performs activation. Because ILE C/C++ service programs are not called,they are activated during the call to an ILE C/C++ program that directly or indirectly requires their services.

Activations and activation groups:

  • Help ensure that ILE C/C++ programs running in the same job run independently without intruding on each other by scoping resources to the activation group. Example of programs running in the same job run are commitment control, overrides, and shared files.
  • Scope resources to the ILE C/C++ program.
  • Uniquely allocate static data needed by the ILE C/C++ program or service program.
  • Change symbolic links to ILE C/C++ service programs to physical addresses.

When activation allocates the storage necessary for the static variables that are used by an ILE C/C++ program, the space is allocated from an activation group. At the time the ILE C/C++ program or service program is created, you specify the activation group that should be used at run time.

Once an ILE C/C++ program is activated, it remains activated until the activation group is deleted. Even though they are activated, programs do not appear in the call stack unless they are running.

When an OS/400 job is started, the system creates two activation groups for OPM programs. One activation group is reserved for OS/400 system code and the other is used for all other OPM programs. You cannot delete the OPM default activation groups. The system deletes them when your job ends.

An activation group can continue to exist even when the main() function of an ILE C/C++ program is not on the call stack. This occurs when the ILE C/C++ program was created with a named activation group (specifying a name on the ACTGRP option of the CRTPGM command), and the main() function issues a return. This can also occur when the ILE C/C++ program performs a longjmp() across a control boundary by using a jump buffer that is set in an ILE C/C++ procedure. This procedure is higher in the call stack and before the nearest control boundary.


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM-ILE Topics