Can I send an email from a CLIP?

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

Yes.

CLIP2 and CLIP9 are prime candidates for sending email notification for required authorizations and completion/failure notification. Here is an example using SMTP to send email notification:

//    SET REQUESTNO = '&ASRRID.SUBRF'<<F,L>>  
//    SET SUBBY = '&PCLUSERID'<<F,L>>         
//    SET SUBNAME = '&ASRRID.SUBNM'<<F,L>>    
//    SET SUBDATE = '&ASRRID.REQDT'<<F,L>>    
//    SET SUBDD = '&SUBDATE'<<F+4,F+5>>       
//    SET SUBMM = '&SUBDATE'<<F+2,F+3>>       
//    SET SUBYY = '&SUBDATE'<<F,F+1>>
//    SET RCPT = 'authorizer@company.COM'        
//EMAIL    EXEC PGM=IEBGENER                                  
//SYSOUT   DD  SYSOUT=*                                       
//SYSPRINT DD  SYSOUT=*                                       
//SYSIN    DD  DUMMY                                          
//SYSUT2   DD  SYSOUT=(B,SMTP)                                
//SYSUT1   DD  *,FORMAT=(,SUB)                                
HELO ESP                                                      
MAIL FROM: <ESP52@LOCALHOST>                                  
RCPT TO: <&RCPT>                         
DATA                                                          
FROM: ESP ALCHEMIST                                           
TO:   &RCPT                              
SUBJECT: REQ #&REQUESTNO AUTHORIZATION NOTIFICATION           
------------------------------------------------              
  ALCHEMIST REQUEST - #&REQUESTNO                             
SUBMITTED BY USERID - &SUBBY.  (&SUBNAME.)                    
                 ON - &SUBMM/&SUBDD/&SUBYY                    
------------------------------------------------              
REQUIRES YOUR AUTHORIZATION/APPROVAL.                                  
THE REQUEST CONTAINS THE FOLLOWING ENTITIES:                           
ENTITY NAME              ENTITY TYPE                                   
-----------              -----------                                   
//         SET  I=1                                                    
//         WHILE I<=&ASRRED_COUNT                                      
//         IF  '&ASRRED(I).ENAME<<F,L>>' NOT NULL                      
//    SET EN = '&ASRRED(I).ENAME'<<F,F+23>>                            
//    SET ET = '&ASRRED(I).ETYPE'<<F,L>>                               
&EN &ET                                                                
//         ENDIF                                                       
//         SET  I=I+1                                                  
//         ENDWHILE                                                    
THIS IS A POST-ONLY MAILING.  PLEASE DO NOT RESPOND TO THIS MESSAGE.   
.                                                                      
QUIT                                                                   
/*

The email address can be for any eligible device, such as a pager.

This Frequently Asked Question applies to all supported releases of ESP Alchemist.