Starting and stopping the C\Prof Web UI web application server

The Apache Tomcat web application server supplied with C\Prof runs under the JZOS batch launcher. As discussed in the Getting started section, you can use the C\Prof ISPF dialog to generate JCL to run the web application server.

An example of this JCL is supplied below.

Startup JCL

//CPROFCOL JOB ,
/*JOBPARM SYSAFF=SYS1                                                 
//JZOSPROC PROC VERSION='86',   JZOSVM version: 86,96 etc               
//   LOGLVL='',                 Debug LVL: +I(nfo) +D(ebug) +T(race)    
//   REGSIZE='0M',              Max region                              
//   LEPARM='',                                                         
//   JAVACLS='org.apache.catalina.startup.Bootstrap',                   
//   ARGS='start'                                                       
//*====================================================================
//* PROC for running Apache Tomcat using the JZOS batch Java launcher.  
//*                                                                     
//* NB: This JCL must be Mixed Case                                     
//*====================================================================
//JZOS     EXEC PGM=JVMLDM&VERSION,REGION=&REGSIZE,                     
//   PARM='&LEPARM/&LOGLVL &JAVACLS &ARGS'                              
//STEPLIB  DD DISP=SHR,DSN=TXC.V1R2M0.STXCAUTH                         
//SYSPRINT DD SYSOUT=*                        System stdout             
//SYSOUT   DD SYSOUT=*,RECFM=VB,LRECL=32756   System stderr             
//STDOUT   DD SYSOUT=*,RECFM=VB,LRECL=32756   Java System.out           
//STDERR   DD SYSOUT=*,RECFM=VB,LRECL=32756   Java System.err           
//TXCCONF  DD DISP=SHR,                       CPROF config              
//            DSN=CPROF.CONFIG(CONFIG1)                            
//CEEDUMP  DD SYSOUT=*                                                  
//SYSUDUMP DD SYSOUT=*                                                  
//ABNLIGNR DD DUMMY                                                     
//STDENV   DD DUMMY                                                     
//         PEND                                                         
//*                                                                     
//CPROFWEB EXEC JZOSPROC                                                
//JZOS.STDENV DD *                                                      
#######################################################################
#                                                                       
# This is a shell script which configures environment variables         
# for the Java JVM in order to run the C\Prof web application using     
# the Apache Tomcat application server.                                 
#                                                                       
#######################################################################

#-----------------------------------------------------------------------
#                                                                       
# Dot in the installation profile script, which is useful in setting    
# the system LOCALE, LANG, and TZ variables.                            
#                                                                       
#-----------------------------------------------------------------------
. /etc/profile                                                          

#-----------------------------------------------------------------------
# JAVA_HOME - Must be 64-bit and a minimum of Java 1.8 (Java 8)         
#-----------------------------------------------------------------------
export JAVA_HOME=\usr\lpp\java\J8.0_64                                  

export JAVA_HOME                                                        

#-----------------------------------------------------------------------
#                                                                       
# Tomcat paths:                                                         
#                                                                       
# CATALINA_HOME  The root of the Tomcat installation                    
# CATALINA_BASE  Tomcat may be configured for multiple instances by
#                defining CATALINA_BASE or each instance. If multiple
#                instances are configured, CATALINA_BASE is the same as
#                CATALINA_HOME
#                                                                       
#-----------------------------------------------------------------------
CATALINA_HOME=\u\cprof\                                            
CATALINA_BASE=\u\cprof\                                            

IJO="-Xms64m -Xmx128m"  # min and max Java heap sizes                   

export _JAVA_OPTIONS="-Duser.home=${CATALINA_HOME}"                     

export HOME=${CATALINA_HOME}                                            

#=======================================================================
#                                                                       
# Configure Java Properties via IBM_JAVA_OPTIONS env variable.          
#                                                                       
#=======================================================================

# ASCII default encoding                                                
IJO="$IJO -Dfile.encoding=ISO8859-1"                                    

# Catalina properties                                                   
IJO="$IJO -Dcatalina.base=${CATALINA_BASE}"                             
IJO="$IJO -Dcatalina.home=${CATALINA_HOME}"                             
IJO="$IJO -Djava.io.tmpdir=${CATALINA_BASE}/temp"                       

# IBM crypto URL handler                                                
IJO="$IJO -Djava.protocol.handler.pkgs=com.ibm.crypto.provider"         

# Tomcat logging                                                        
IJO="$IJO -Djava.util.logging.manager="                                 
IJO="${IJO}org.apache.juli.ClassLoaderLogManager"                       
IJO="$IJO -Djava.util.logging.config.file="                             
IJO="${IJO}${CATALINA_BASE}/conf/logging.properties"                    

export IBM_JAVA_OPTIONS="$IJO "                                         

#=======================================================================
#                                                                       
# Setup PATH and LIBPATH from scratch to avoid installation profile     
# conflicts.                                                            
#                                                                       
#=======================================================================
export PATH=/bin:"${JAVA_HOME}"/bin:                                    

LIBPATH=/lib:/usr/lib:"${JAVA_HOME}"/bin                                
LIBPATH="$LIBPATH":"${JAVA_HOME}"/lib/s390                              
LIBPATH="$LIBPATH":"${JAVA_HOME}"/lib/s390/j9vm                         
LIBPATH="$LIBPATH":"${JAVA_HOME}"/bin/classic                           

#=======================================================================
#                                                                       
# C\Prof JNI native code path                                           
#                                                                       
#=======================================================================
LIBPATH="$LIBPATH":"${CATALINA_HOME}"/shared/lib                        

export LIBPATH="$LIBPATH":                                              

#=======================================================================
#                                                                       
# Set up Tomcats "boot" classpath.                                      
#                                                                       
#=======================================================================
CLASSPATH="${JAVA_HOME}/lib/tools.jar"                                  
CLASSPATH="$CLASSPATH":"${CATALINA_HOME}/bin/bootstrap.jar"             
CLASSPATH="$CLASSPATH":"${CATALINA_HOME}/bin/tomcat-juli.jar"           

#=======================================================================
#                                                                       
# Some default JVM diagnostic settings.                                 
# See the IBM SDK Diagnostics guide for more info                       
#                                                                       
#=======================================================================
export JAVA_DUMP_HEAP=true                                              
export JAVA_PROPAGATE=NO                                                
export IBM_JAVA_ZOS_TDUMP=NO                                            

#=======================================================================
#                                                                       
# JNI logging                                                           
#                                                                       
#=======================================================================
#export TXC_FLOG_LEVEL=7                                                

/*

Example web server JCL

Some of the important elements of this sample JCL are described below:

  • JOBPARM SYSAFF=SYS1

    Run the web server on LPAR SYS1.

  • JZOSPROC

    PROC for running Apache Tomcat using the JZOS batch launcher.

  • JZOS EXEC PGM=JVMLDM...

    Execute the JZOS batch launcher. For more information, see JZOS batch launcher

  • STEPLIB

    C\Prof library STXCLINK.

  • TXCCONF

    The configuration file of your running C\Prof collection server. The web server requires a running collection server to access the CICS internal trace and any transactions it may have recorded.

  • JZOS.STDENV

    Java JVM environment variables.

    • JAVA_HOME

      The path name of your Java 1.8 ("Java 8") installation in z\OS UNIX. C\Prof requires the 64-bit version of Java 8 which is typically installed in /usr/lpp/java/J8.0_64/.

    • CATALINA_HOME and CATALINA_BASE

      The installation location for the C\Prof web server (Apache Tomcat) and application in the z\OS UNIX file system. For example, /u/cprof/.

    • IBM_JAVA_OPTIONS and IJO statements

      Used to set IBM Java SDK options. For more information, see JZOS batch launcher.

      Note: If you find that the C\Prof web server runs out of heap space, adjust the -Xmx option to increase the maximum Java heap size.

Stopping the servers

To stop the C\Prof Web UI web application server, use SDSF:

  1. From the ISPF Primary Option Menu, type S.
  2. Type /STOP <jobname> where is the name of your server.

results matching ""

    No results matching ""