Multiple Applications Running in the Same Job
User-named activation groups allow you to leave an activation group in a job for later use. A normal return operation or a skip operation (such as longjmp() in ILE C) past the control boundary does not delete your activation group.
This allows you to leave your application in its last-used state. Static variables and open files remain unchanged between calls into your application. This can save processing time and may be necessary to accomplish the function you are trying to provide.
You should be prepared, however, to accept requests from multiple independent clients running in the same job. The system does not limit the number of ILE programs that can be bound to your ILE service program. As a result, you may need to support multiple clients.
Figure 1 shows a technique that you may use to share common service functions while keeping the performance advantages of a user-named activation group.

Each call to a procedure in service program X requires a user handle. The field ID represents a user handle in this example. Each user is responsible for providing this handle. You do an initialization routine to return a unique handle for each user.
When a call is made to your service program, the user handle is used to locate the storage variables that relate to this user. While saving activation group creation time, you can support multiple clients at the same time.