View previous topic :: View next topic
|
Author |
Message |
keane
New User
Joined: 24 Jul 2006 Posts: 11
|
|
|
|
I have input file, how to create a CSV file and how to send a CSV attachment to email. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
keane
New User
Joined: 24 Jul 2006 Posts: 11
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|