Create an active WLM environment

When creating a Db2® Automation Expert stored procedure for use with maintenance windows, the stored procedure must be associated with an active Workload Manager (WLM) environment.

You can do this by using one of the following methods:
  • When customizing Db2 Automation Expert using Tools Customizer, select the option to create a WLM address space for that stored procedure to use. Then run the generated JCL.
  • Use an existing WLM PROC that is already active for your Db2 subsystem. If you choose to adapt an existing WLM PROC to run the Db2 Automation Expert stored procedures, the PROC must include the Db2 Automation Expert load library and the FEC load library. Additionally, the PROC must have a DD named DB2PARMS that points to the Db2 Automation Expert control file.

Each Db2 environment (SSID or data sharing group) must have separate PROCs and separate WLM environments.

The WLM PROC must be activated using the WLM panels. This is generally done by a systems programmer. When activating the WLM environment for use with Db2 Automation Expert, the following settings are required:

Application Environment Name
Enter the WLM ENVIRONMENT parameter in the DDL that defines the stored procedure(s).
Description
(Optional) Enter a description.
Subsystem Type
Must be set to DB2.
Procedure Name
Enter the name of the JCL PROC that defines the address space in which the stored procedure runs.
Start parameters
Required parameters are:
DB2SSN=ssid
APPLENV=applenv_name 

Optional parameter:

NUMTCB=number 
applenv_name must be the same value that was entered in the Application Environment Name field.
NUMTCB can be left unspecified and specified in the JCL PROC. The sample PROC provided handles the NUMTCB parameter in the PROC. If specified on the WLM panel, the panel specification takes precedence over the JCL PROC parameter.
Take into account the following considerations:
  • Use the same name for the application environment name and the JCL PROC.
  • Adopt a naming convention for the application environment name that includes the SSID as part of the name, such as ssidxxxx or xxxxssid. For example, for two WLM environments that are associated with Db2 Automation Expert on Db2 subsystem ID DB2A, then possible application environment and procedure names might be DB2ADAJ1 and DB2ADAJ2, respectively.