Saturday, May 17, 2025

Send multiple files as attachment thru email in a single job step from Mainframe

XMITIP is a mainframe based electronic mail application that is capable of sending electronic mail to any valid Intranet or Internet address. Along with messages, XMITIP can also send mainframe files in one of several different file attachment formats.  XMITIP is written almost completely in z/OS REXX by Lionel B Dyck.

Guide can be found at https://github.com/lbdyck/pubs/blob/main/XMITIP-Guide.pdf

The below job step sends two mainframe datasets as attachment.

//XMITIP  EXEC PGM=IKJEFT1B        
//SYSEXEC  DD DISP=SHR,DSN=system.sysexec library  
//DD1      DD DISP=SHR,DSN=MY.FILE1     
//DD2      DD DISP=SHR,DSN=MY.FILE1    
//SYSPRINT DD  SYSOUT=*                          
//SYSTSPRT DD  SYSOUT=*                          
//SYSTSIN DD   *                                 
%xmitip mainframe.dev@abc.com                     +    
        MSGT 'This is the body of the mail'       +
        From mainframe.dev@abc.com                +
        Subject 'This is the subject of the mail' +
        FILEDD (DD1 DD2)                          +                  
        FILENAME (file1.csv file2.csv)               
/*                                               

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.