IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to send a CSV attachment to email


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
keane

New User


Joined: 24 Jul 2006
Posts: 11

PostPosted: Tue Nov 18, 2008 2:25 am
Reply with quote

I have input file, how to create a CSV file and how to send a CSV attachment to email.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 18, 2008 2:38 am
Reply with quote

Hello,

Write a small cobol program that uses STRING to build the delimited file (i recommend tab rather than comma).

Write a 2-step jcl that runs your STRING program followed by an e-mail step. Name the file you created in the e-mail step as an attachment.

There are multiple e-mail examples in the forum. If you find something you do not understand, post what you found and your question.

Someone will be able to clarify.
Back to top
View user's profile Send private message
keane

New User


Joined: 24 Jul 2006
Posts: 11

PostPosted: Tue Nov 18, 2008 2:47 am
Reply with quote

I have verfied few forum but i can not understand the format.

The below one is the example

//STEP1 EXEC PGM=IEBGENER,COND=(0,NE)
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=OFRT.SMTP.STATMENT.F1000,disP=SHR
// DD DSN=OFRT.MAIL3.TESTFILE.D0723,DISP=SHR
// DD DSN=OFRT.MIME.CLOSING.F1000,DISP=SHR
//SYSUT2 DD SYSOUT=(B,SMTPROC),LRECL=1000


content of OFRT.SMTP.STATMENT.F80

HELO MAILTST1
MAIL FROM:<mymail@domain.COM>
RCPT TO:<group@domain.COM>
DATA
SUBJECT: : ERROR QUEUE - MESSAGES READY FOR MANUAL PROCESSING
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED;"SIMPLE BOUNDARY"

HI ALL,

PLEASE FIND THE ATTACHED MESSAGES FOR MANUAL REPROCESSING TILL 9:15 AM
EXTRCTED TODAY.
PLEASE IGNORE THE ATTACHMENT WITH THE NAME 'ATT'.

PLEASE LET ME KNOW IN CASE YOU NEED MORE DETAILS.

REGARDS,
deepa

--SIMPLE BOUNDARY
CONTENT-DISPOSITION:ATTACHMENT;FILENAME="ERROR_STATISTICS.TXT"
CONTENT-TYPE: TEXT/PLAIN


OFRT.MAIL3.TESTFILE.D0723 is the file i would like to send as attatchment

contents of OFRT.MIME.CLOSING.F80

--SIMPLE BOUNDARY--
THIS IS THE EPILOGUE.IT IS ALSO TO BE IGNORED
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 18, 2008 3:37 am
Reply with quote

Hello,

Here is the link to the SMTP standard:
www.faqs.org/rfcs/rfc2821.html

If you are not familiar with the mechanics of sending e-mail (other than point/click thru a web browser), suggest you take some time to look over this.

Suggest that when you begin testing, send something very small from your mainframe to yourself. You might also ask others who work on your system if they have used e-mail in batch and clone what they have rather than beginning from scratch. If no one has ever done this on your system, you need to talk with the system support and/or networking people to let them know this is needed.

There is also XMITIP which is free, but must be installed.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts mail attachment with excel format All Other Mainframe Topics 2
No new posts REXX to send an email in Mainframe wi... CLIST & REXX 3
No new posts REXX to send an email in Mainframe CLIST & REXX 4
No new posts help send file AFT CONTROLM EM IBM Tools 0
No new posts how to send 10 rows at a time to output CICS 2
Search our Forums:

Back to Top