Environment variables

Environment variables are case-sensitive named variables with assigned values that various processes in the Communications Server configuration can access. Applications use environment variables to define the characteristics of their specific environment. Many z/OS® Communications Server applications use environment variables to provide configuration information to the Language Environment® runtime functions, OMVS, the resolver, and to the application itself.

Use one of the following basic methods to specify environment variables:

  • Specify the environment variable in the parameter field of the EXEC JCL statement in the started procedure.

    For example:

    //CONFHFS EXEC PGM=SYSLOGD,Start of changeREGION=0MEnd of change,TIME=NOLIMIT,
    //        PARM='ENVAR("TZ=EST5EDT")/-c -i -f /user1/syslogd.conf'

    This method is useful when only one or two environment variables are required, as the maximum length of the PARM value is limited to 100 characters.

  • Specify a file that contains the environment variables, which are processed during initialization of the application.

    For example:

    //CONFHFS EXEC PGM=SYSLOGD,Start of changeREGION=0MEnd of change,TIME=NOLIMIT,
    //        PARM='ENVAR("_CEE_ENVFILE_S=DD:STDENV")/-c -i'

    This method is useful when multiple environment variables are required.

    The DD statement STDENV can point to a z/OS file system (zFS) file or to an MVS data set.

    • To allocate a zFS file on the STDENV DD statement:
      //STDENV   DD PATH='/etc/syslogd.env',PATHOPTS=(ORDONLY)
    • To allocate an MVS data set on the STDENV DD statement:
      //STDENV   DD DISP=SHR,DSN=TCPIP.SYSLOGD.ENV(SYSLOGD)

    When you are using the _CEE_ENVFILE_S environment variable, the data set organization can be a sequential data set or a member of a partitioned data set with a record format of Fixed, Fixed Blocked, Variable, or Variable Blocked. Trailing blank spaces are removed from the end of each record.

    Each record that contains an equal sign (=) is considered to be an environment variable. The text before the equal sign is the name of the environment variable. The text after the equal sign is the value of the environment variable. The case of the name and value are not changed.

    You can use _CEE_ENVFILE_COMMENT as the first environment variable in the file to embed comments in the environment variable file. For example:

    _CEE_ENVFILE_COMMENT=#
    ###################################################
    #   SYSLOGD environment variables
    #   Last update =  2012/04/25
    ###################################################
    SYSLOGD_CODEPAGE=IBM_1047
    SYSLOGD_DEBUG_LEVEL=0

    The character that is specified for the _CEE_ENVFILE_COMMENT environment variable is then used in column 1 of a record to indicate that the record is a comment record and is to be ignored.

    Rule: If you do not define the _CEE_ENVFILE_COMMENT environment variable, text strings of the form name=value are processed as environment variables. For example, if #SYSLOGD_CODEPAGE=IBM_1047 is encountered in an environment variable file, the environment variable #SYSLOGD_CODEPAGE is defined with the value IBM_1047.

For more information about using environment variables, see z/OS XL C/C++ Programming Guide.

Language Environment and UNIX System Services also provide environment variables. For information about these other variables, see Understanding Shell Variables in z/OS UNIX System Services User's Guide.

Table 1 lists where to find more information about some common environment variables that z/OS Communications Server and its applications explicitly set or use.
Table 1. Common environment variables
Environment Variable Description Reference
_BPX_JOBNAME Changes the job name when the application creates a new address space (FTPD) _BPX environment variables in z/OS UNIX System Services Planning
_BPXK_SETIBMOPT_TRANSPORT Requests transport affinity to a specific TCP/IP stack Requesting transport affinity in z/OS UNIX System Services Planning
_CEE_ENVFILE The name of an environment file, trailing blanks are left intact _CEE_ENVFILE in z/OS XL C/C++ Programming Guide
_CEE_ENVFILE_S The name of an environment file, trailing blanks are removed from each record _CEE_ENVFILE_S in z/OS XL C/C++ Programming Guide
_CEE_ENVFILE_COMMENT The character in column 1 of a record of the ENVFILE that indicates that the record is a comment record and is to be ignored _CEE_ENVFILE_COMMENT in z/OS XL C/C++ Programming Guide
_CEE_ENVFILE_CONTINUATION The last non-space character in a record that indicates that the environment variable value is continued on the next record _CEE_ENVFILE_CONTINUATION in z/OS XL C/C++ Programming Guide
RESOLVER_CONFIG The name of the TCPIP.DATA data set Specifying TCP/IP address space parameters in z/OS Communications Server: IP Configuration Reference
Table 2 lists where to find more information about the environment variables that particular z/OS Communications Server applications explicitly set or use.
Table 2. Environment variables by application
Application For environment variable information, see:
Communications Server SMTP (CSSMTP) CSSMTP application environment variables in z/OS Communications Server: IP Configuration Reference
Defense Manager daemon (DMD) Steps for configuring the DMD
Digital certificate access server (DCAS) DCAS environment variables in z/OS Communications Server: IP Configuration Reference
FTP client Environment variables in z/OS Communications Server: IP User's Guide and Commands
FTP server FTP server environment variables in z/OS Communications Server: IP Configuration Reference
IKE daemon IKE environment variables in z/OS Communications Server: IP Configuration Reference
MIBDESC MIBDESC environment variables in z/OS Communications Server: IP Configuration Reference
Motif Motif environment variables in z/OS Communications Server: IP Programmer's Guide and Reference
Network security services (NSS) server Steps for configuring the NSS server
OMPROUTE OMPROUTE environment variables in z/OS Communications Server: IP Configuration Reference
ORSHD RSHD command (orshd) environment variables in z/OS Communications Server: IP Configuration Reference
OSNMP OSNMP environment variables in z/OS Communications Server: IP Configuration Reference
Policy Agent Policy Agent environment variables in z/OS Communications Server: IP Configuration Reference
Resolver z/OS XL C/C++ environment variables for configuration files
SLAPM2 subagent (nslapm2) Network SLAPM2 subagent environment variables in z/OS Communications Server: IP Configuration Reference
SNMP agent OSNMPD environment variables in z/OS Communications Server: IP Configuration Reference
SNMP DPI SNMP DPI environment variables in z/OS Communications Server: IP Programmer's Guide and Reference
Start of changeSyslog daemonEnd of change Start of changeSyslogd environment variables in z/OS Communications Server: IP Configuration ReferenceEnd of change
TRAPFWD daemon TRAPFWD environment variables in z/OS Communications Server: IP Configuration Reference
UNIX Telnet server (otelnetd) Environment variables
X Window System interface V11R4 and Motif version 1.1 Environment variables in z/OS Communications Server: IP Programmer's Guide and Reference
X Window System X Window System environment variables in z/OS Communications Server: IP Programmer's Guide and Reference