EasyManuals Logo

IBM DB2 User Manual

IBM DB2
585 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #174 background imageLoading...
Page #174 background image
2. Create the Workload Manager for z/OS (WLM) application environment for
running the routines.
3. Set up the run-time environment for Java routines, which includes setting
environment variables.
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.
Notes to Figure 52:
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
®
run-time
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.
//DSNWLM PROC RGN=0K,APPLENV=WLMIJAV,DB2SSN=DSN,NUMTCB=5 1
//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 2
//JSPDEBUG DD SYSOUT=A 3
//CEEDUMP DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
Figure 52. Startup procedure for a WLM address space in which a Java routine runs
158 Application Programming Guide and Reference for Java

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM DB2 and is the answer not in the manual?

IBM DB2 Specifications

General IconGeneral
DeveloperIBM
Initial Release1983
LicenseProprietary
Written inC, C++
CategoryDatabase Management System (RDBMS)
Operating SystemLinux, Windows
Programming LanguagesC, C++
Data ModelsRelational
EditionsCommunity, Standard, Advanced
Key Featureshigh availability, scalability