Previous Topic: CA JCLCheckNext Topic: Batch Terminal Interface


Email

Use the email feature for an automatic problem notification. The email feature of CA WA CA 7 Edition provides the capability to generate and send emails from the address space using standard SMTP protocol. This feature is primarily intended for an automatic problem notification, such as job abends. However, the feature can notify end-users or other staff about any status.

Business Value:

Using email provides quicker notification of job abends and better communication within your organization.

Additional Considerations:

To implement the email feature:

Add the following DD to your CA7ONL procedure.

//SYSTCPD DD DSN=VTAM.TCPIP.DATA,DISP=SHR

The SYSTCPD DD statement points to the data set containing systemwide TCP/IP definitions. If only one TCP/IP system is executing in the environment, you can omit this DD statement from the CA7ONL procedure. If you have multiple TCP/IP environments, code the SYSTCPD DD statement pointing to the definition library for the TCP/IP.

Note: If TCP/IP is not in the linklist, add the TCP/IP STEPLIB data sets to the CA7ONL STEPLIB concatenation.

The following references to AL2xxxxx members are for releases starting with r11.3. Release 11.1 uses member names that start with CAL2xxxx that reside in the CAL2OPTN library.

Next, add the following statements in your initialization file with the appropriate values:

EMAIL,ESERVER=email.com,            
      EADDRLIB=CA7.AL2EADR,
      EMAILLIB=CA7.AL2EMAIL,
      EFROM=CA7,              
      EREPLY=CA7@do.not.reply,           
      EPORT=25,                           
      ETIMEOUT=10

If you do not already have one, build the data set referenced by EADDRLIB. The data set is a fixed block, 80-byte PDS. Members of the EADDRLIB PDS are used to build the list of email addresses to which emails are sent. The TO=xxxxxxxx keyword on the /EMAIL command specifies the member name. Also, provide a TXT keyword on the /EMAIL command to provide the message text to send. We provide four sample messages to send for job failures, abends, late jobs, and jobs ending. Member AL2EMAIL in the CAL2JCL library contains these samples.

A batch utility, AL2EMLT, is available to test the email interface in an isolated environment. The utility can be used to test different SMTP (email) servers, new templates, new email address members, or all. AL2EMLT provides information about a "dummy" job so that email templates with variables referencing job information are shown with realistic data. See the AL2EMAIL member in the CAL2OPTN library.

Verify that you have an L2SCEMAL resource that is defined to the external security exactly like you would have for other L2xxxx commands.

To generate an automatic email notification for job failures, you have an ARFSET set up to respond with a /EMAIL command. A sample ARFSET follows. The ARFSET gets invoked for a job when a return completion rc = 0004. The ARFSET then issues the /EMAIL command to send an email to the email addresses listed in the member named SUPPORT with the message found in the library AL2EMAIL member @JOBEND.

----------------------- ARF CONDITION EDIT FOR SUPPORT --------------- FUNCTION: LIST (ADD,DELETE,EXIT,FORMAT,LIST,REPL,SAVE,SR,SS) DEFCT: 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