How to send email using jcl and TEP - IBA-mainframe-dev/Global-Repository-for-Mainframe-Developers GitHub Wiki

How to send email using jcl and TEP?

  1. Create jcl like the following: http://planetmvs.com/mvsmail/
//* E-MAIL TEMPLATE FOR NOTIFICATIONS 
//EMAILJOB JOB (EMAIL),'EMAIL',         
//      CLASS=A,MSGCLASS=F,                          
//      MSGLEVEL=(1,1),TIME=60,                      
//      NOTIFY=&SYSUID,REGION=0M                     
//SEND     EXEC PGM=IEBGENER                         
//SYSIN    DD DUMMY                                  
//SYSPRINT DD SYSOUT=*                               
//SYSOUT   DD DUMMY                                  
//SYSUT2   DD SYSOUT=(B,SMTP)                        
//SYSUT1   DD *                                      
HELO MVSHOST                                         
MAIL FROM:<[email protected]>             
RCPT TO:<[email protected]>               
DATA                                                 
FROM: [email protected]
TO:   [email protected]              
SUBJECT: EMAIL_FROM_LPAR1                        
TEXT
/*                                                   

If you submit it you will get an email.

  1. Open TEP with tso_userID

1

  1. Select LPAR > Storage Subsystem > AGENT:STORAGE > Dataset Group Summary

Right click on any row and select Create Batch Job

2

  1. Insert jcl location:

3

  1. Press Edit JCL if you want to change it.
  2. Press OK. It will be submitted.
  3. The result will be placed to Storage Toolkit workspace.

4

Also, you can specify a situation and use Storage Toolkit for an action for it. So jcl will be submitted every time when the situation is triggered.