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, 1
// MNSPAS=0
//IEFPROC EXEC PGM=DSNX9WLM,REGION=&RGN,TIME=NOLIMIT,
// PARM='&DB2SSN,&NUMTCB,&APPLENV,&MNSPAS' 2
//STEPLIB DD DISP=SHR,DSN=DSND10.RUNLIB.LOAD
// DD DISP=SHR,DSN=CEE.SCEERUN
// DD DISP=SHR,DSN=DSND10.SDSNEXIT
// DD DISP=SHR,DSN=DSND10.SDSNLOAD
// DD DISP=SHR,DSN=DSND10.SDSNLOD2
//JAVAENV DD DISP=SHR,DSN=WLMIJAV.JSPENV 3
//*JSPDEBUG DD SYSOUT=A 4
//CEEDUMP DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
Notes to Figure 1:
| Note | Explanation |
|---|---|
| 1 | In this statement:
|
| 2 | DSNX9WLM is the program that is executed to run stored procedures in a 31-bit stored procedure environment. To run Java routines in a 64-bit, multi-threaded environment, change DSNX9WLM to DSNX9WJM. |
| 3 | 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 contain the SDK for Java. |
| 4 | Specifies a data set into which Db2 puts information that you can use to debug your stored procedure. The JSPDEBUG DD statement is optional, and is commented out. Uncomment this statement only during testing, if you need to debug setup problems. Debugging should be done only under the direction of IBM® Software Support. |