This document serves as an outline for the installation procedures. Full installation documentation can be found in the Installation and Users Guide.
Prerequisite: Java 8
Java 8 added greatly improved time classes in the java.time package. EasySMF:JE uses these extensively so Java 8 is required.
Prerequisite: JZOS Toolkit
Java SMF uses JZOS functions to read and convert data.
The JZOS Toolkit allows you to run your Java program as a batch job using DD statements to specify the SMF datasets to be read.
If the JZOS Toolkit is not already set up, install it according to the instructions in the Installation and User’s Guide. This involves copying the load module from <JAVA_HOME>/mvstools into a PDS/E, and copying and customizing the PROC and JCL from <JAVA_HOME>/mvstools/samples/jcl.
JCL to run Java programs is distributed with the JZOS Toolkit in <JAVA_HOME>/mvstools/samples/jcl/JVMJCL80.
Java SMF also uses functions from ibmjzos.jar. When developing or running Java SMF programs on platforms other than z/OS, you will need to copy this jar (ibmjzos-n.n.n.jar, where n.n.n is the version) from your z/OS Java installation to the build/class path.
EasySMF:JE
EasySMF:JE is distributed as a zip file containing the EasySMF jar, EasySMF Javadoc and EasySMF samples or as a TSO TRANSMIT format file with the same items plus a JCL library with installation JCL and sample PROCs.
On z/OS
Upload the TSO TRANSMIT file in binary format to a FB 80 dataset on the mainframe.
Use TSO RECEIVE to restore the installation dataset.
The #INSTALL member contains one job which will restore the jar files and samples to HFS files. Set the target location for the files, update the source to point to the installation dataset and run the job.
There are also several IVPs that can be run to verify the installation, and JCL procedures that can be customized to simplify the use from batch JCL.
Other platforms
Unzip the file and add the EasySMF jar to the Java class path or build path.
The class path and build path also need to contain the JZOS jar. This should be downloaded from your z/OS system (observe any IBM licensing restrictions).
Running .class files
When running .class files, add the jars to the CLASSPATH.
Using the JVMJCL80 sample JCL:
# Customize your CLASSPATH here APP_HOME=/u/ibmuser/java CLASSPATH=$APP_HOME:"${JAVA_HOME}"/lib:"${JAVA_HOME}"/lib/ext CLASSPATH="$CLASSPATH":/<directory>/easysmf-je-n.n.n.jar # Add Application required jars to end of CLASSPATH for i in "${APP_HOME}"/*.jar; do CLASSPATH="$CLASSPATH":"$i" done export CLASSPATH="$CLASSPATH":
where <directory> is the HFS directory containing the jar files.
If they are in the APP_HOME directory the JVMJCL80 script will add them to the CLASSPATH automatically.
Running .jar files
Any classpath specified by environment variables or Java arguments is ignored when running a jar file. The classpath for dependencies can be specified in the jar file manifest.
The sample program jar files specify lib/ as the classpath. The EasySMF:JE jar needs to be in the lib subdirectory, relative to the location of the sample jar.
Running the Sample Programs
To run the sample programs, copy the jar file (or class file if you compiled from source) to a HFS directory. Copy the EasySMF:JE jar to the lib subdirectory.
Make the following changes to JVMJCL80:
- Change JAVACLS on the EXEC statement, where <directory> is the location of the jar file to run
//JAVA EXEC PROC=JVMPRC80,
// JAVACLS='-jar /<directory>/recordcount.jar'
where recordcount.jar is the sample you want to run.
- Add the INPUT DD statement to the step
//INPUT DD DISP=SHR,DSN=smf.dataset
Submit the JCL.