Refreshing WLM environments for stored procedures automatically

You can enable automatic refreshes for WLM environments for stored procedures.

Before you begin

If a security product is configured to authorize MVS console commands, you must grant authorization for the Db2 ssnmMSTR address space to issue MVS commands.

Procedure

To enable automatic refreshes of WLM environments for stored procedures:

Add the following DD statement to the startup procedure for the WLM-established stored procedure address space:
//AUTOREFR DD DUMMY

Db2 saves the environment name in a list of environments to refresh automatically. If the z/OS® Resource Recovery Services (RSS) environment is recycled, but Db2 and the its associated WLM-established stored procedures address space are not restarted, Db2 issues the following z/OS command to refresh each environment that is named in the list:

VARY WLM,APPLENV=environment-name,REFRESH
Recommendation: To prevent the automatic issuing of duplicate and unnecessary VARY WLM,APPLENV=applenvname commands, limit the number of startup procedures that contain the //AUTOREFR DD statement . The WLM,APPLENV=applenvname command has a sysplex scope, which means that it affects all servers of an application environment on all systems in the Sysplex. The result is that every Db2 subsystem issues its own WLM,APPLENV=applenvname command for each application environment that is nominated by the //AUTOREFR DD statement in its startup procedure.