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,
REGION=0M
,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,
REGION=0M
,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=0The 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_1047is encountered in an environment variable file, the environment variable #SYSLOGD_CODEPAGE is defined with the value IBM_1047. - To allocate a zFS file on the STDENV DD
statement:
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.
| 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 |