Refreshing WLM application environments for stored procedures
When you make certain changes to a stored procedure or to the JCL startup procedure for a WLM application environment, you need to refresh the WLM application environment.
Before you begin
About this task
Refreshing the WLM environment starts a new instance of each address space that is active for the WLM environment. Existing address spaces stop when the current requests that are executing in those address spaces complete.
Refresh the WLM application environment if any of the following situations are true:
- For external procedures (including external SQL procedures), you changed the stored procedure logic, the load module, or the CREATE PROCEDURE definition.
- For a Java™ stored procedure, you changed the properties that are pointed to by the JAVAENV data set.
- You changed the JCL startup procedure for the WLM
application environment. Restriction: In some cases, refreshing the WLM environment might not be sufficient to incorporate your change. For example, assume that you changed the NUMTCB value in the JCL. The refresh fails because WLM cannot start a new WLM address space that has a different NUMTCB value as the existing one. In this case, you need to quiesce the WLM environment while you change the JCL startup procedure, and resume the environment when your changes are complete.
If you create a procedure that uses an existing WLM environment, you do not need to refresh the WLM environment.
Procedure
To refresh a WLM application environment for stored procedures:
- Call the WLM_REFRESH stored procedure.
- Issue the following z/OS® command:
VARY WLM,APPLENV=environment-name,REFRESH
In this command, environment-name is the name of a WLM application environment that is associated with one or more stored procedures. The application environment is refreshed to incorporate the changed load modules for all stored procedures and user-defined functions in the particular environment.
- To stop all stored procedures address spaces that are associated
with the WLM application environment name, use
the following z/OS command:
The address spaces stop when the current requests that are executing in those address spaces complete.VARY WLM,APPLENV=name,QUIESCE
This command puts the WLM application environment in QUIESCED state. When the WLM application environment is in QUIESCED state, the stored procedure requests are queued. If the WLM application environment is restarted within a certain time, the stored procedures are executed. If a stored procedure cannot be executed, the CALL statement returns SQL code -471 with reason code 00E79002.
- To restart all stored procedures address spaces that are associated
with WLM application environment name, use
the following z/OS command:
VARY WLM,APPLENV=name,RESUME
New address spaces start when all JCL changes are established. Until that time, work requests that use the new address spaces are queued.
Also, you can use the VARY WLM command with the RESUME option when the WLM application environment is in the STOPPED state due to a failure. This state might be the result of a failure when starting the address space, or because WLM detected five abnormal terminations within 10 minutes. When an application environment is in the STOPPED state, WLM does not schedule stored procedures for execution in it. If you try to call a stored procedure when the WLM application environment is in the STOPPED state, the CALL statement returns SQL code -471 with reason code 00E7900C. After correcting the condition that caused the failure, you need to restart the application environment.