For z/OS platforms

Administering the Liberty profile on z/OS

On the z/OS® platform you can start, stop, or modify the Liberty profile by using MVS™ operator commands.

Before you begin

Ensure that the following security profiles are set up as described in Enabling z/OS authorized services on the Liberty profile for z/OS.
  • STARTED profiles for the server process, and the angel process
  • SERVER profiles to allow access to authorized z/OS services

About this task

This topic describes how to start, modify, and stop the Liberty profile by using the MVS console. You can also start and stop the server from a shell (see Starting and stopping a server from the command prompt).

A started task is JCL that is run immediately in response to an operator START command. Two JCL procedure templates (PROCs) are available in the wlp/templates/zos/procs directory. One template is for the server process, and the other is for the angel process:
  • bbgzsrv for the Liberty profile.
  • bbgzangl for the angel process that is required for controlling access to system authorized services on the z/OS platform.
Administrators can copy the templates to a user location, and then customize them to start Liberty profile servers from the MVS console.
Note: Files in the /templates directories might be modified when product updates are applied.
The examples section provides further information about the two PROC templates.

The target of an operator STOP command is a job or a started task.

After the JCL procedure templates are customized, they must be placed into the system procedure library concatenation. The name of the procedure member becomes the argument to the START command.

Procedure

Example

The following example shows the procedure template for the server process (bbgzsrv). This PROC is in a data set in the z/OS proclib concatenation.

//BBGZSRV PROC PARMS='defaultServer'
//*------------------------------------------------------------------
//* INSTDIR - the path to the WebSphere Liberty Profile install.
//*           This path is used to find the product code and is
//*           equivalent to the WLP_INSTALL_DIR environment variable
//*           in the Unix shell.
//* USERDIR - the path to the WebSphere Liberty Profile user area.
//*           This path is used to store shared and server specific
//*           configuration information and is equivalent to the
//*           WLP_USER_DIR environment variable in the Unix shell.
//*------------------------------------------------------------------
//  SET INSTDIR='/u/MSTONE1/wlp'
//  SET USERDIR='/u/MSTONE1/wlp/usr'
//*------------------------------------------------------------------
//* Start the Liberty server
//*
//* WLPUDIR - PATH DD that points to the Liberty Profile's "user"
//*           directory. If the DD is not allocated, the user
//*           directory location defaults to the wlp/usr directory
//*           in the install tree.
//* STDOUT  - Destination for stdout (System.out)
//* STDERR  - Destination for stderr (System.err)
//* STDENV  - Initial Unix environment - read by the system.  The
//*           installation default and server specific server
//*           environment files will be merged into this environment
//*           before the JVM is launched.
//*------------------------------------------------------------------
//STEP1   EXEC PGM=BPXBATSL,REGION=0M,
//  PARM='PGM &INSTDIR./lib/native/zos/s390x/bbgzsrv &PARMS' 
//WLPUDIR  DD PATH='&USERDIR.' 
//STDOUT   DD SYSOUT=* 
//STDERR   DD SYSOUT=* 
//*STDENV   DD PATH='/etc/system.env',PATHOPTS=(ORDONLY) 
//*STDOUT   DD PATH='&ROOT/std.out', 
//*            PATHOPTS=(OWRONLY,OCREAT,OTRUNC), 
//*            PATHMODE=SIRWXU 
//*STDERR   DD PATH='&ROOT/std.err', 
//*            PATHOPTS=(OWRONLY,OCREAT,OTRUNC), 
//*            PATHMODE=SIRWXU
Notes:
  • The launcher uses the STDENV DD as the initial environment, but this DD is optional. The initial environment to the process is defined in the PROC. It can point to any type of data set that LE supports, but the format must be compatible with what is expected. For example, EBCDIC, simple key=value with no expansion.
  • A PATH DD that points to an existing directory (not a file) is allowed. If that DD is opened, the FILE stream that is returned is valid for fldata so the HFS path that is associated with the DD can be used. The PROC template defines a WLPUDIR PATH DD that represents the equivalent of WLP_USER_DIR.
  • The WLP_USER_DIR is determined by the following logic:
    • If the WLPUDIR DD is defined, the associated path is used as WLP_USER_DIR
    • If WLPUDIR is not defined but WLP_USER_DIR is set in the initial environment (from STDENV), it is used
    • If WLPUDIR is not defined and WLP_USER_DIR is not set in the initial environment, the default value of $WLP_INSTALL_DIR/usr is used
  • The environment is determined by the following logic:
    • If the STDENV DD is defined, it is read by LE as the initial environment
    • If $WLP_INSTALL_DIR/etc/server.env exists and is readable, its key=value contents are read and set into the environment. The file can be in ASCII or EBCDIC. Comments start with a '#' and go to the end of the line. Values that contain white space can be placed in double quotation marks. Any environment entries that are specified in this file overrides entries from the initial environment
    • If $WLP_USER_DIR/servers/{serverName}/server.env exists and is readable, its key=value contents are read and set into the environment. This file can also be in ASCII or EBCDIC and supports comments. Any entries that are specified here override entries from the initial environment and the etc/server.env.
    • Regardless of the user specified environment, the following entries are explicitly set: _BPXK_WLM_PROPAGATE=NO, JAVA_THREAD_MODEL=HEAVY, and JAVA_PROPAGATE=NO. If _EDC_PTHREAD_YIELD is not set, it is set to -2.
  • After the environment is set, the JAVA_HOME is determined by the following logic:
    • If JAVA_HOME is set in the environment, its location is used as JAVA_HOME
    • If JAVA_HOME is not set in the environment but $WLP_INSTALL_DIR/../java64 exists, $WLP_INSTALL_DIR/../java64 is used as JAVA_HOME
    • If JAVA_HOME is not set in the environment and $WLP_INSTALL_DIR/../java64 does not exist, $WLP_INSTALL_DIR/../java is used as JAVA_HOME
  • After JAVA_HOME is determined, JVM command line options are determined by the following logic:
    • If $WLP_USER_DIR/servers/{serverName}/jvm.options exists and is readable, its contents are read. The file can be in ASCII or EBCDIC and each line of the file should be a single java command line argument. Comments start at a '#' and go to the end of the line
    • If $WLP_USER_DIR/servers/{serverName}/jvm.options does not exist but $WLP_INSTALL_DIR/etc/jvm.options exists and is readable, its contents are read. The file can be in ASCII or EBCDIC and must have one java command line argument per line. Comments are supported
    • Regardless of the contents of any jvm.options, -Dfile.encoding=iso8859-1, -javaagent:$WLP_INSTALL_DIR/lib/bootstrap-agent.jar, and -classpath $WLP_INSTALL_DIR/lib/server-launcher.jar are on the command line
  • If you want to pass arguments to the JVM, define the JAVAOPTS DD statement so that Java™ command line arguments are then read from this DD. The following example shows a sample input file:
    -Xmx512m
    -Xms256m
    -Daaa.bbb.ccc=something.forsomeone
  • When a Liberty profile server is started from a proc, the server validates that it is not running with a umask of 000. If it detects that the umask is 000, it overrides it with a value of 022.
The following example shows the command that you would use to start the Liberty profile by using the sample bbgzsrv proc for a configured "defaultServer":
start bbgzsrv,parms='defaultServer' 
The following example shows the procedure template for the angel process (bbgzangl):
//BBGZANGL PROC PARMS='',COLD=N
//*------------------------------------------------------------------
//  SET ROOT='/u/MSTONE1/wlp'
//*------------------------------------------------------------------
//* Start the Liberty angel process
//*------------------------------------------------------------------
//STEP1   EXEC PGM=BPXBATA2,REGION=0M,
//  PARM='PGM &ROOT./lib/native/zos/s390x/bbgzangl COLD=&COLD &PARMS' 
//STDOUT    DD SYSOUT=* 
//STDERR    DD SYSOUT=*

Icon that indicates the type of topic Task topic

Terms and conditions for information centers | Feedback


Timestamp icon Last updated: Monday, 21 April 2014
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=phil&product=was-nd-mp&topic=twlp_admin_zos
File name: twlp_admin_zos.html