Sending email attachment from mainframe – MIME format

pts.
Tags:
390
IBM DB2
Mainframe
Hi, I need to email 2 flat files from mainframe as CSV files. (the data in the flat files already contains the delimiter ','). The problem is, i get the 2 files attachements as CSV, but nothing in them! I feel I've got the MIME formatting wrong. I use IEBGENER, and the flat files are FB format. Here's part of the code: HELO nodename MAIL FROM:<from address> RCPT TO:<to address> DATA FROM: from address TO: to address SUBJECT: Daily Reports MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="simpleboundary" --simpleboundary Please find attached the two reports. --simpleboundary Content-Description:Test report1 Content-Disposition:attachment;FILENAME="Report1.CSV" // DD DSN=REPORT.FILE1,DISP=SHR // DD * --simpleboundary Content-Description:Test report2 Content-Disposition:attachment;FILENAME="Report2.CSV" // DD DSN=REPORT.FILE2,DISP=SHR // DD * --simpleboundary . QUIT //SYSUT2 DD SYSOUT=B,DEST=SMTP Any help in this matter will be highly appreciated. Thanks

Answer Wiki

Thanks. We'll let you know when a new response is added.

I would suggest installaing and using XMITIP. This excellent free tool can be found at

http://www.lbdsoftware.com/tcpip.html

Hope this helps…

Discuss This Question: 2  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • BlueKnight
    I don't have any problem mailing a comma delimited file from our system. We are currently running zOS 1.3 on a 7060-H50 (Multiprise 3000) -- soon to be zOS 1.4 on a Z890-2086. This is how we have it set up (I hope it renders properly - looks awful after I pasted it). Maybe this would work for you... Joblib member: //MAILIT01 JOB (Z12CJIS,T,N),'EMAIL A FILE', // CLASS=S, // MSGCLASS=X, // MSGLEVEL=(1,1) //* //*--------------------------------------------------------------------* //* Redirects sequential dataset via mainframe utility to email sys. * //* Sends an email to all the users listed in the parmlib member * //* mail2me. * //*--------------------------------------------------------------------* //* Where: * //* To( EMAIL ADDRESS FULLY QUALIFIED INCLUDING DOMAIN -- * //* AS MANY AS NEEDED) ENCLOSED IN PARENTHESIS * //* Su( SUBJECT AS WILL APPEAR IN EMAIL INBOX ENCLOSED IN * //* PARENTHESIS * //* Da( FULLY QUALIFIED DATA SET NAME CONTAINING DATA TO BE SENT * //* ENCLOSED IN PARENTHESIS * //* batch AS IT APPEARS * //* * //* Don't forget the + (plus) sign to denote continuation. * //* Watch out for lower case letters in JCL * //*--------------------------------------------------------------------* //* //STEPA001 EXEC TSOBATCH //SYSTSIN DD DSN=TEST.PARMLIB(MAIL2ME),DISP=SHR //* //SYSPRINT DD SYSOUT=* //SYSIN DD DUMMY //SYSOUT DD SYSOUT=* //SYSABOUT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* // Parmlib member: PROFILE NOPREFIX SMTPNOTE + TO(SOMEBODY@CO.SANMATEO.CA.US + MYACCOUNT@YAHOO.COM) + Su(CSV FILE VIA EMAIL TEST) + Da(TCJS.S0.JUS750) + batch Regards, Jim
    10 pointsBadges:
    report
  • nnavee
    Hello everyone!

    I also facing same issue which described above . Am receiving 
    Empty file as an attachment .

    Please help me out by copying 
    Jcl here
    10 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following