0

I try to send attachment (2 csv files) using JCL. When I use XMIT all is good enter image description here

and I 've got lay out I want. But when I use IEBGENER:

HELO ...                                
MAIL FROM:<user@xxx.COM>                           
RCPT TO:<user@xxx.COM>                             
DATA                                                      
FROM:     userH@xxx.COM                             
TO:       user@xxx.COM                             
SUBJECT:  RACF REPORT                                     
MIME-VERSION: 1.0                                         
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY" 
--SIMPLE BOUNDARY                                         
CONTENT-TYPE: TEXT/CSV                                    
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=TEST1.CSV       
                                                      
//         DD DSN=file1.CSV,DISP=SHR    
//         DD *                                           
--SIMPLE BOUNDARY                                         
CONTENT-TYPE: TEXT/CSV                                    
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=TEST2.CSV       
                                                      
//         DD DSN=file.CSV,DISP=SHR   

I 've got something strange:

enter image description here

Maybe anybody know whats wrong?

Community
  • 1
  • 1

1 Answers1

0

Best is to use FTP if you have a ftp server and access to a output directory. Example from Submitting FTP requests in batch

//USER28F  JOB ,CARTER,MSGLEVEL=(1,1)
//FTPSTP1  EXEC PGM=FTP,REGION=2048K,
//             PARM='9.67.112.25 (EXIT TIMEOUT 20'
//NETRC    DD  DSN=ANYHLQ.NETRC,DISP=SHR
//OUTPUT   DD  SYSOUT=H
//INPUT    DD  *
type e
mode b
put idss.parts
/*

For the PARM parameter target the SMTP server that you have available at your environment. And as for the NETRC dataset here is the info NETRC data set info

However if you still want to send it via an email you are missing few things in the job above. Best to lookup here Send email with attachment on Mainframe using JCL

Regards, Jarek.

Community
  • 1
  • 1
Jarek Brocki
  • 129
  • 1
  • 9