Why use application environments?

An application environment is a way to group similar server programs together and have workload management dynamically create and delete server address spaces as needed to handle the work. Each application environment typically represents a named group of server functions that require access to the same application libraries. Depending on the subsystem's implementation of application environments, the scope of server address space management is either confined to a single system or is sysplex-wide. There is also an option to manually start and stop the server address spaces for an application environment if there is a special or temporary requirement to control the number of servers independently of workload management.

If you are using a subsystem that takes advantage of application environments, you need to refer to the subsystem documentation for guidance on how to use them for that subsystem. For a list of the IBM-supplied subsystems currently using application environments, see Defining application environments.

Figure 1 shows an example of how two application environments, AE1 and AE2, can be used to handle work requests from a subsystem. In this example, three types of work requests, X, Y, and Z are handled. X and Y might be two different kinds of payroll inquiries, and Z might be a loan inquiry.

Figure 1. Application environment example
This figure shows how three types of work requests named X, Y, and Z are handled

The names X, Y, and Z are used by clients when making the work requests. The work manager subsystem contains a table or file that associates the work request names with an application environment name; in this example, X and Y are associated with application environment AE1, and Z with AE2. The application environment names AE1 and AE2 are specified to workload management in the service definition stored in the WLM couple data set, and are included in the active policy when a policy is activated.

Each application environment must be assigned a system procedure library (PROCLIB) member name that contains the JCL required to start server address spaces for the application environment. In the example, PROCS1 and PROCS2 are associated with application environments AE1 and AE2, respectively.

When the work manager subsystem receives a type Y work request from a client, the subsystem requests that workload management associate the request with AE1. Workload management determines if a server address space is available to handle the request, or if an address space needs to be created. If a server address space exists, workload management makes the request available for the server. If a server address space does not exist or if more are required, workload management starts a server address space using the startup JCL procedure named PROCS1 which is defined for AE1 in the active policy.

Workload management dynamically creates new server address spaces if they are needed to handle more incoming work and, for certain subsystems such as DB2®, decreases the number of server address spaces if less capacity is needed. Refer to Defining application environments for a description of how to define application environments to workload management.