Here is a JCL example for running Tomcat as a started task using your current installed OM Web Viewer with the embedded Tomcat from a full install of Web Viewer.
This is sample JCL for running embedded Tomcat as a Started task.
//PRTOMCAT PROC LEPARM=, < Optional LE parm // ARGS='start', < Args to Java class // JAVACLS='org.apache.catalina.startup.Bootstrap', < Java Start // VERSION='86', OK < JVM version 8.0 (64 bit) //*TCPDATA='VTAM.TCPIP.TCPIP.DATA', < SYSTCPD dsn from TCPIP proc //*LOGLVL=' ' < Set log level to none // LOGLVL='+I' < Set log level to Info //* //* Start the Tomcat Server //* //TOMCAT EXEC PGM=JVMLDM&VERSION,REGION=0M, // PARM='&LEPARM/&LOGLVL &JAVACLS &ARGS' //*STEPLIB DD DSN=&LIBRARY,DISP=SHR //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //STDOUT DD SYSOUT=* //STDERR DD SYSOUT=* //CEEDUMP DD SYSOUT=* // PEND //EXTOMCAT EXEC PRTOMCAT //STDENV DD DISP=SHR,DSN=<#YOUR DSN HERE#>
# This member contains all the environment variables # used by the JVM to start the Tomcat server for a # a particular product # # 1.) Edit INSTALL_HOME to point to the USS path # that contains the deployed CA Common Services for z/OS # Tomcat directory. # # 2.) Edit PRODUCT_HOME to point to the USS path # for this Tomcat product instance. The path should # not include the /tomcat dir itself. # # 3.) Edit the CATALINA_HOME Common Services /tomcat directory # name if required. /tomcat will always point at the # default tomcat release that common services is # delivering and may change to a higher release if # CCS maintenance is applied or a new release of CCS is # installed. If a product needs a particular release of # Tomcat use this directory naming- /apache-tomcat-v.r.nn # where v is version, r is release, and nn is modification # level. CA Common Services will deliver .nn levels as PTFs # and new v.r levels as new FMIDs. New v.r levels can be # controlled with the CATALINA_HOME setting. Older .nn # levels within a v.r level will not be available for # choosing here. # # 4.) Edit JAVA_HOME to point to the location of the JDK # # 5.) If you are using 64 bit Java, change the s390 directory # to s390x in the LIBPATH. From the command line, issue: # C /s390 /s390x all # # CATALINA_BASE=<#YOUR TOMCAT PATH#> CATALINA_HOME=<#YOUR SAME TOMCAT PATH#> # For 64-bit JAVA ------------------------------ export JAVA_HOME=/sys/java64bt/v8r0m0/usr/lpp/java/J8.0_64 export PATH=/bin:"${JAVA_HOME}"/bin:"${CATALINA_HOME}"/bin CLASSPATH="${JAVA_HOME}/lib/tools.jar" CLASSPATH="$CLASSPATH":"${CATALINA_HOME}/bin/bootstrap.jar" CLASSPATH="$CLASSPATH":"${CATALINA_BASE}/bin/tomcat-juli.jar" export CLASSPATH="$CLASSPATH": # For 64-bit JAVA ------------------------------ LIBPATH=/lib:/usr/lib:"${JAVA_HOME}"/lib/s390x:"${CATALINA_HOME}"/lib LIBPATH="$LIBPATH":"${JAVA_HOME}"/lib/s390x/classic export LIBPATH="$LIBPATH": CAOMWV12_HOME=<#YOUR HOME INSTALL PATH#> export CAOMWV12_HOME="$CAOMWV12_HOME" # Configure JVM options # Note that Tomcat requires default ASCII file.encoding IJO="$IJO -Dfile.encoding=UTF-8" IJO="$IJO -Duser.timezone=America/New_York" IJO="$IJO -Dcatalina.base=${CATALINA_BASE}" IJO="$IJO -Dcatalina.home=${CATALINA_HOME}" IJO="$IJO -Djava.io.tmpdir=${CATALINA_BASE}/temp" IJO="$IJO -Dibm.serversocket.recover=true" IJO="$IJO -Djava.endorsed.dirs=" IJO="${IJO}${CATALINA_HOME}/common/endorsed" IJO="$IJO -Dderby.system.home=${CATALINA_BASE}/../../derby" IJO="$IJO -Dlog.dir=${CATALINA_BASE}/mfui/logs" IJO="$IJO -Xshareclasses:name=none" IJO="$IJO -Xms1024m -Xmx4096m" # TEST #IJO="$IJO -Xdump:filter=/OutOfMemoryError" #IJO="$IJO -Xdump:heap+java:events=vmstop,request=exclusive+prepwalk" IJO="$IJO -Xdump:directory=/u/users/omdev/apps/dumps" # END TEST # --- garbage collection -- # The -Xgcpolicy options control the behavior of the Garbage # Collector. There are a number of changes to garbage collection # options. The changes to the garbage collection options are: # # Recommendation for Web Viewer/Tomcat on USS # -Xgcpolicy:optthruput IJO="$IJO -Xgcpolicy:optthruput" export IBM_JAVA_OPTIONS="$IJO " export IBM_HEAPDUMP=false export JAVA_PROPAGATE=NO export IBM_JAVA_ZOS_TDUMP=NO /*