Mail sent via CSSMTP does not display correct local time

Technote (troubleshooting)


Problem(Abstract)

Timestamps in mail messages sent via CSSMTP are incorrect compared to system local time when specifying the TZ environment variable in an environment file using _CEE_ENVFILE in the started procedure. An example of this is:

//CSSMTP EXEC PGM=CSSMTP,REGION=0K,TIME=NOLIMIT,
// PARM=('ENVAR("_CEE_ENVFILE=DD:STDENV")/&OPT')

where the STDENV environment file contains the following statement:

TZ=EST5EDT

Cause

Using _CEE_ENVFILE to define environment files can produce unpredictable results when parsing environment variables, if there are trailing blanks present in the file.

Diagnosing the problem

To determine if using _CEE_ENVFILE is causing your issue, remove the TZ environment variable from your STDENV environment file and modify your EXEC statement in your CSSMTP started procedure to include the TZ environment variable as follows:

//CSSMTP EXEC PGM=CSSMTP,REGION=0K,TIME=NOLIMIT,
// PARM=('ENVAR("_CEE_ENVFILE=DD:STDENV"',' "TZ=EST5EDT")/&OPT')

This should produce the correct local timestamps in the email messages.


Resolving the problem

Update your CSSMTP started procedure to utilize _CEE_ENVFILE_S to set your environment variable file. _CEE_ENVFILE_S strips any trailing blanks present in the file. The modified EXEC statement should look similar to the following:

//CSSMTP EXEC PGM=CSSMTP,REGION=0K,TIME=NOLIMIT,
// PARM=('ENVAR("_CEE_ENVFILE_S=DD:STDENV")/&OPT')

where the STDENV environment file contains the TZ environment variable.

The _CEE_ENVFILE_COMMENT may also be included in the environmental file to define the comment character for the file. The following is an example of an environment file used for CSSMTP:


_CEE_ENVFILE_COMMENT=#
###################################################
#   CSSMTP Environment statements
#   Last update =  2012/12/12

###################################################
CSSMTP_CODEPAGE_CONFIG=IBM_1047
TZ=EST5EDT

Rate this page:

(0 users)Average rating

Document information


More support for:

z/OS Communications Server

Software version:

1.11, 1.12, 1.13, 2.1

Operating system(s):

z/OS

Reference #:

1592255

Modified date:

2013-03-25

Translate my page

Machine Translation

Content navigation