Setting Up The Wlm Application Environment For Java Routines - IBM DB2 Manual

Table of Contents

Advertisement

2. Create the Workload Manager for z/OS (WLM) application environment for
3. Set up the run-time environment for Java routines, which includes setting

Setting up the WLM application environment for Java routines

To set up WLM application environments for stored procedures or user-defined
functions, you need to define a JCL startup procedure for each WLM environment,
and define the application environment to WLM. You need different WLM
application environments for Java routines from the WLM application
environments that you use for other routines.
To set up the WLM environment for Java routines, you need to perform these
steps:
1. Create a WLM environment startup procedure for Java routines.
2. Define the WLM environment to WLM.
WLM address space startup procedure for Java routines
The WLM address space startup procedure for Java routines requires extra DD
statements that other routines do not need.
The following figure shows an example of a startup procedure for an address
space in which Java routines can run. The JAVAENV DD statement indicates to
DB2 that the WLM environment is for Java routines.
//DSNWLM PROC RGN=0K,APPLENV=WLMIJAV,DB2SSN=DSN,NUMTCB=5
//IEFPROC EXEC PGM=DSNX9WLM,REGION=&RGN,TIME=NOLIMIT,
// PARM='&DB2SSN,&NUMTCB,&APPLENV'
//STEPLIB DD DISP=SHR,DSN=DSN910.RUNLIB.LOAD
// DD DISP=SHR,DSN=CEE.SCEERUN
// DD DISP=SHR,DSN=DSN910.SDSNEXIT
// DD DISP=SHR,DSN=DSN910.SDSNLOAD
// DD DISP=SHR,DSN=DSN910.SDSNLOD2
//JAVAENV DD DISP=SHR,DSN=WLMIJAV.JSPENV
//JSPDEBUG DD SYSOUT=A
//CEEDUMP DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
Figure 52. Startup procedure for a WLM address space in which a Java routine runs
Notes to Figure 52:
158
Application Programming Guide and Reference for Java
running the routines.
environment variables.
1
In this line, change the DB2SSN value to your DB2 for z/OS subsystem name.
Change the APPLENV value to the name of the application environment that you
set up for Java stored procedures. The maximum value of NUMTCB should be
between 5 and 8. For testing a Java stored procedure, NUMTCB=1 is
recommended. With NUMTCB=1, only one JVM is started, so refreshing the WLM
environment after you change the stored procedure takes less time.
2
JAVAENV specifies a data set that contains Language Environment
options for Java stored procedures. The presence of this DD statement indicates to
DB2 that the WLM environment is for Java routines. This data set must contain
the environment variable JAVA_HOME. This environment variable indicates to
DB2 that the WLM environment is for Java routines. JAVA_HOME also specifies
the highest-level directory in the set of directories that containing the Java SDK.
1
2
3
®
run-time

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents