Implementing Email Support for CA 7

Document ID : KB000027383
Last Modified Date : 14/02/2018
Show Technical Document Details

Question:

How do you implement the email feature of CA 7?

Answer:

This procedure will help you implement the email feature. The email feature provides the capability to generate and send emails from the CA 7 address space using standard SMTP protocol. This feature is primarily intended for automatic problem notification, such as job abends. However, it can be used to notify end-users or other staff about any status.

The following procedure describes how to implement email support.

  1. Add the following DD to you CA7ONL procedure.
    //SYSTCPD DD DSN=VTAM.TCPIP.DATA,DISP=SHR
    NOTE: The SYSTCPD DD statement points to the data set containing system-wide TCP/IP definitions. This DD statement may be omitted from the JCL Procedure if there is only one TCP/IP system executing in the environment. If there are multiple TCP/IP environments, then code the SYSTCPD DD statement pointing to the definition library for the TCP/IP.

    NOTE: If TCP/IP is not in the link list, then the TCP/IP STEPLIB data sets must be added to the CA 7 STEPLIB concatenation.

  2. Next add the following statements in your CA 7 initialization file with the appropriate values:
     EMAIL,ESERVER=email.com,                  EADDRLIB=CA7R11.CAIEADDR,      EMAILLIB= CA7R11.CAIEMAIL,      EFROM=CA-7,                    EREPLY=CA-7@do.not.reply,                 EPORT=25,                                 ETIMEOUT=10
  3. Members of the EADDRLIB PDS are used to build the list of email addresses to which emails are sent. The member name is specified by the TO=xxxxxxxx keyword on the /EMAIL command. You will also need to provide a TXT keyword on the /EMAIL command to provide the message to send. We provide four sample messages to send for Job failures, abends, late jobs and jobs ending. These samples can be found in the CAIEMAIL Library.

  4. A batch utility, CAL2EMLT, is available to test the email interface in an isolated environment. The utility can be used to test different SMTP (email) servers, new templates, and/or new email address members. CAL2EMLT provides information about a "dummy" job so that email templates with variables referencing job information will be displayed with realistic data (See L2EMAIL member in SAMPJCL library).

  5. You need to be sure that you have L2SCEMAL defined to external security just like you would have for other L2xxxx commands.
    -----------------------  ARF CONDITION EDIT FOR SUPPORT  ---------------                                                                       FUNCTION: LIST      (ADD,DELETE,EXIT,FORMAT,LIST,REPL,SAVE,SR,SS)  DEFC  TYPE: JC    SYS EQ *        SID EQ 0    RSTC GE 0     EM EQ * DEFID: 1                                                                                      FROM: 01011975 0001     TO: 12312074 2359                                                                                           JC, SC TST: STEP EQ *         PROC EQ *          PGM EQ *                                                                                       CC/ABENDS : CC  EQ 0004 __  ??? GE 000   __  ??? GE 000   __                                                                                               ??? GE 000  __  ??? GE 000   __  ??? GE 000                EC, EE, IS, LB, LE, LS TST:                                                                                                                                 RO:     DATE:           TIME:           AO:    INT/ADJ:     RESPONSES:                                                                                                                            1: AC,M=/EMAIL,TO=SUPPORT,TXT=@JOBEND,JOB=&JOBNAME                              2:                                                                 3:                                                                 FINAL --  DISP   : N CA-11?: N BYPGDG: N  USAGE:    PROCESS:    CC:          START :                    END :                         PROGRAM: AR32   MSG-INDX: 00   -- AR.3.1   --   yy.ddd / hh:mm:ss

To generate automatic email notification for job failures, you will have an ARFSET set up to respond with a /EMAIL command. Below is a sample ARFSET that gets invoked for a job when a return completion 'rc = 0004' and then issue the /EMAIL command to send an email to the email address(es) listed in the member called SUPPORT with the message found in library CAIEMAIL member @JOBEND.  For this to work consistently, you would also need to set the COND-CODE and RO on the DB.1 screen to have CC 4 seen as a failure.

 Additional Information:

As always, please contact CA Technologies support for CA 7 if you have further questions.