Service Programs and Activation Groups
When you create an ILE service program, decide whether to specify an option of *CALLER or a name for the ACTGRP parameter. This option determines whether your service program will be activated into the caller's activation group or into a separately named activation group. Either choice has advantages and disadvantages. This topic discusses what each option provides.
- Static procedure calls are fast
Static procedure calls into the service program are optimized when running in the same activation group.
- Shared external data
Service programs may export data to be used by other programs and service programs in the same activation group.
- Shared data management resources
Open files and other data management resources may be shared between the service program and other programs in the activation group. The service program may issue a commit operation or a rollback operation that affects the other programs in the activation group.
- No control boundary
Unhandled exceptions within the service program percolate to the client programs. HLL end verbs used within the service program can delete the activation group of the client programs.
- Separate address space for variables, if using single-level
storage model.
The client program cannot manipulate pointers to address your working storage. This may be important if your service program is running with adopted authority.
- Separate data management resources
You have your own open files and commitment definitions. The accidental sharing of open files is prevented.
- State information controlled
You control when the application storage is deleted. By using HLL end verbs or normal language return statements, you can decide when to delete the application. You must, however, manage the state information for multiple clients.