Setting up the runtime environment for Java routines
The SYSFUN.SYSTS_ENCRYPT user-defined function requires that the WLM environment be set up for processing Java™ routines.
About this task
If you want to reuse an existing WLM environment for Java routines, the WLM environment must comply with all of the requirements that are specified in this task.
Procedure
To set up a new WLM environment:
Install IBM® Java Technology Edition, version 8 or later. You can install the 31-bit or the 64-bit version. This software might already be installed on your system. The location of the installation is typically under the HFS directory, such as /usr/lpp/java/8.0 or /usr/lpp/java/8.0_64.Note:- You can use the following command to determine the IRLM function level:
MODIFY irlmproc,STATUS,ALLI - The SYSFUN.SYSTS_ENCRYPT user defined function is incompatible with IBM Semeru Runtime® for z/OS®, version 11 or later, pending approval and availability of the FIPS 140-3 cryptographic module in these versions.
- For compatibility with IBM Semeru Runtime for z/OS, version 17 or later, the XSLTRANSFORM scalar function requires a toleration APAR, either PH56646 (for Db2 13) or PH63240 (for Db2 12).
- For compatibility with IBM Semeru Runtime for z/OS, version 17 or later, the XSR_COMPLETE stored procedure requires a toleration APAR, PH58678 and z/OS 3.1 with APAR OA65253, or later.

- You can use the following command to determine the IRLM function level:
- Install the IBM Db2 Driver for JDBC and SQLJ for the version of Db2 for z/OS that you are using. The required JDBC driver files might already be installed with Db2 on your system. The location of the installation is typically under the HFS directory, such as /usr/lpp/db2d10/jdbc.Note: If you migrated your Db2 subsystem from a previous release of Db2, the previous release of the JDBC and SQLJ driver will not work anymore. You must migrate to the latest version of the Db2 Driver for JDBC and SQLJ.
- Create a JCL startup procedure for this WLM environment's
address space to run the SYSFUN.SYSTS_ENCRYPT user-defined function.
In addition to the required DD statements for Java routines, this function requires that the JSPDEBUG DD must be removed or commented out for security reasons. This requirement is because the SYSFUN.SYSTS_ENCRYPT function takes a password as an input parameter, and this password might be logged in the debugging output if JSPDEBUG DD is enabled.
The following example shows the JCL that you can use to run the SYSFUN.SYSTS_ENCRYPT function:
//procName PROC DB2SSN=ssnm,NUMTCB=1,APPLENV=wlmEnvName //TCBNUM1 EXEC PGM=DSNX9WLM,TIME=1440, // PARM='&DB2SSN,&NUMTCB,&APPLENV', // REGION=0M //STEPLIB DD DISP=SHR,DSN=ceepre.SCEERUN <- LE runtime lib // DD DISP=SHR,DSN=dsnpre.SDSNEXIT <- DB2 exit lib // DD DISP=SHR,DSN=dsnpre.SDSNLOAD <- DB2 runtime lib // DD DISP=SHR,DSN=dsnpre.SDSNLOD2 <- JDBC/SQLJ DLL lib //JAVAENV DD DISP=SHR,DSN=prefix.JSPENV <- JSP runtime opts //*JSPDEBUG DD SYSOUT=A <- debugging output //CEEDUMP DD SYSOUT=A . <- LE dump output //SYSPRINT DD SYSOUT=A <- diagnosticswhere:- procName specifies the procedure name that is associated with the WLM environment.
- wlmEnvName specifies the name of the WLM environment.
- ssnm specifies the name of the Db2 subsystem.
- NUMTCB specifies the startup time. Set this value to 1 for optimal startup time performance.
- ceepre specifies the prefix of the IBM Language Environment® (LE) runtime library.
- dsnpre specifies the prefix of your Db2 for z/OS runtime libraries.
- prefix.JSPENV specifies the data set that contains the LE runtime options for running the SYSFUN.SYSTS_ENCRYPT function.
- Create a JAVAENV runtime environment data set with the
DSN that you specified in the JCL procedure. This data set must contain at least the following two LE environment variables:
- JAVA_HOME specifies the installation directory of the Java Technology Edition, version 8 or later.
- JCC_HOME specifies the installation directory of the Db2 Driver for JDBC and SQLJ.
Depending on your system, the DB2_BASE variable might be required. DB2_BASE specifies the Db2 HFS program files. You must specify this variable only if the files are installed in a directory other than /usr/lpp/db2d10/base on your system.
The following example shows a typical JAVAENV data set, when customized appropriately for the SYSFUN.SYSTS_ENCRYPT function:ENVAR("JAVA_HOME=/usr/lpp/java/J8.0", "JCC_HOME=/usr/lpp/db2d10/jdbc"), XPLINK(ON)Note: If you migrated your Db2 subsystem from a previous release of Db2, you must remove the DB2_HOME variable from any existing JAVAENV data sets and add the new JCC_HOME variable. - Define the WLM environment for Java routines by specifying the appropriate values on the WLM setup panels.