Assigning stored procedures and functions to WLM application
environments
You can assign procedures to WLM environments to route
the work that is associated with the procedures to specific address
spaces.
About this task
Workload manager routes work to address spaces based on
the application environment name and service class associated with
the stored procedure or function.
To assign a stored procedures
or user-defined functions to run in WLM-established stored procedures
address spaces:
Procedure
Make sure a numeric value is specified for the STORTIME
subsystem parameter. If you have problems with setting
up the environment, this timeout value ensures that your request to
execute a stored procedure does not wait for an unlimited amount of
time.
To prevent creating
too many address spaces, create a relatively small number of WLM application
environments and z/OS® service
classes.
Minimize the number of application environments and z/OS service classes. Otherwise,
you might cause WLM to create too many WLM address spaces. WLM creates
one address space for each combination of application environment
and service class. In other words, if five application environments
have calling threads, and six service classes exist, WLM might create
as many as 30 address spaces.
Use the WLM application environment panels to associate
the environment name with the JCL procedure. The following figure
shows an example of this panel. For detailed
information about workload management panels and how to use them,
see Using the WLM ISPF Application .
Specify the WLM application environment name for the WLM_ENVIRONMENT
option of the CREATE or ALTER PROCEDURE (or FUNCTION) statement to
associate a stored procedure or user-defined function with an application
environment.
Using the installation utility in the WLM application,
install the WLM service definition that contains information about
this application environment into the couple data set.
Activate a WLM policy from the installed service definition.
Begin running stored procedures.
Recommendations
for assigning stored procedures to WLM environments
The NUMTCB
value that you choose for each application environment will vary by
language. The following table provides general recommendations for
the WLM procedure NUMTCB setting for the different language stored
procedures. These recommendations are based on available resources
and should be tuned accordingly.
Table 1. Recommended types WLM
environments to define
Stored procedure name
NUMTCB value
Comments
COBOL, C/C++, PL/I
10-40
Debugging COBOL, C/C++ and PL/I related stored
procedures
10-40
REXX
1
REXX stored procedures must run in a WLM
procedure with NUMTCB = 1. If they execute in a procedure with NUMTCB>1,
unpredictable results, such as an 0C4 will occur.
Java (non-resettable
mode)
20-40
Each JVM is started in non-resettable mode
and is never reset. This allows you to run many more Java stored procedures.
External SQL stored procedures
10-40
Must have one unauthorized data set. COBOL, C/C++, and PL/I stored procedures can share the
same application environment if the STEPLIB data sets and run time
options are the same for all languages.