View previous topic :: View next topic
|
Author |
Message |
replytovishu
New User
Joined: 09 Dec 2008 Posts: 23 Location: india
|
|
|
|
Hi All,
How to send mail from mainframe using JCL in RTF format?
Regards, Vishal |
|
Back to top |
|
|
replytovishu
New User
Joined: 09 Dec 2008 Posts: 23 Location: india
|
|
|
|
I am currently using IEBGENER.
Getting the mail in Plain Text.
want to have it in Rich text format and font as courier new.
Regards, Vishal |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
You can try the below code as your email header and the actual text content beneath this header.
Rename the attachemnt as .RTF instead of .TXT.
attachment will be considered as RTF document in Courier new 10pt font.
If you need further formatting of your RTF document such as bold, italics etc.. then u gotta use some software like SAS to generate a report and write it out in RTF format.
For sending basic plain text this below header will be sufficient I guess.
Code: |
HELO DUDES
MAIL FROM:<XXX.XXX.COM>
RCPT TO: <YOUR.NAME@COMPANY.COM>
DATA
FROM: MAINFRAME
TO: UNDISCLOSED
SUBJECT: SOME REPORT NAME
MIME-VERSION: 1.0;
CONTENT-TYPE: TEXT/RICH TEXT;
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=ANALYSIS.RTF |
|
|
Back to top |
|
|
replytovishu
New User
Joined: 09 Dec 2008 Posts: 23 Location: india
|
|
|
|
But for me the report is not going as attachment.
Let me explain the scenario in more detail:
Step 1--> is executing a program and creating a report file.
Step 2--> is using IEBGENER utility and sending the file as a mail body in plain text
my problem is I want to send it in Rich text (in message body only) and font as Courier new
Regards, Vishal |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
I assume that u are using SMTP,
Look closely at what IEBGENER step does. It will have a DSN with SMTP header. Amend the header to the code above in previous post. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
my problem is I want to send it in Rich text (in message body only) and font as Courier new |
You are aware, I hope, that this means you are going to have to embed the RTF formatting in the document itself? The mainframe won't automatically generate the RTF formatting commands and the font data by itself? Either you write a program to generate the RTF data yourself, or you use a program (or utility) that generates this data for you. In any case, if you don't SEND the data in RTF format, why on earth would you expect to RECEIVE it in RTF format? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Thinking about the possible products that are available to generate data in the RTF format, it seems to me that most of them are also capable of emailing that same data. |
|
Back to top |
|
|
replytovishu
New User
Joined: 09 Dec 2008 Posts: 23 Location: india
|
|
|
|
//*----------------------------------------------------------
//JS0030 EXEC PGM=IEBGENER,COND=(4,LT)
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=B,DEST=(<some name>,SMTP)
//SYSIN DD DUMMY
//SYSUT1 DD DSN=<file name having report>,DISP=SHR
I am using this job ...now please tell where to add what...
Regards,
Vishal |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Quote: |
file name having report |
wat header content does this have?
Amend the stuff inside this.
Its worth trying Robert's and Kev's Suggestions. |
|
Back to top |
|
|
replytovishu
New User
Joined: 09 Dec 2008 Posts: 23 Location: india
|
|
|
|
But if I put
MIME-VERSION: 1.0;
CONTENT-TYPE: TEXT/RICH TEXT;
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=ANALYSIS.RTF
inside file it is sending report as attachment.
I want it as email body.
Regards,
Vishal |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
inside file it is sending report as attachment.
I want it as email body. |
I strongly urge you to use Google and read RFC 2821, 2822, and the z/OS Communications Server manuals on using SMTP. The mainframe uses SMTP to send email messages. If you read the specifications, you will find that plain text (ASCII characters in the range of 1 to 127 in the collating sequence) is all that can be sent using SMTP in the body of the message. If you want RTF in your message body, you can use a mail client that supports such -- but you cannot do that from a mainframe. Period. If you want to send data in RTF format, you must send it as an attachment -- nothing else will work from the mainframe.
To summarize: you cannot send a message from the mainframe and have the body of the message in RTF or anything except plain text characters. This is an Internet standard not a choice. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Quote: |
you cannot send a message from the mainframe and have the body of the message in RTF or anything except plain text characters. |
mmm...thanks thats informational.
Kindly delete my duplicate post pls made at
Quote: |
Posted: Wed Feb 24, 2010 6:25 pm |
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
inside file it is sending report as attachment.
I want it as email body. |
You can't always get what you want. . . Rolling Stones
You need to either use the tools as provided or create your own tool that does what you think you need. . . |
|
Back to top |
|
|
replytovishu
New User
Joined: 09 Dec 2008 Posts: 23 Location: india
|
|
|
|
Thanks Everybody for your inputs.
I have changed the report to come as attachment.
still have one query.
want to have report as attachment <Done>
and only one line as message body.
Regards, Vishal |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
replytovishu wrote: |
still have one query.
want to have report as attachment <Done> |
Are you asking a question or making a statement? I hope you know, how to send a mail as an attachment?
No - search the forum on "mail" and author as "Robert Sample" - you'll get enough links to start with. |
|
Back to top |
|
|
replytovishu
New User
Joined: 09 Dec 2008 Posts: 23 Location: india
|
|
|
|
Thanks all.
Now i am able to do it.
We can do it with the help of Content type: multipart/mixed;
and then having two differnt content types inside the above one.
first one having only text for message body
and second one having attachment.
Many many thanks to Vasanth.S.. |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Glad to hear you got it sorted |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Quote: |
you cannot send a message from the mainframe and have the body of the message in RTF or anything except plain text characters. This is an Internet standard not a choice. |
Hi Robert,
I respectfully disagree.
I came across an article where HTML content can be sent via SMTP and the HTML content on the body of the email.
The link:
www.zjournal.com/pdfIssue/pdfArticle/Johnston.zJ.Dec-Jan07.pdf
I tried it out and it was working with a sample report, additionally an instream image was also working. Not tried with RTF though. So IMHO I believe mainframe can handle much more stuff than plain text characters.
Pls Correct me if I am wrong.
Regards, |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Uh, HTML is plain text -- it encodes the layout using no non-display characters, right? |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
I agree with html thats the reason i added saying about in stream image. Which is non displayable content |
|
Back to top |
|
|
cthokala
New User
Joined: 24 Oct 2007 Posts: 3 Location: JBurg
|
|
|
|
I have a query on this, if I want to send a email with 10000 records, is it possible?
Regards,
Chandra |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi, Welcome to the forum
What happened when u tried to email 10000 recs.? |
|
Back to top |
|
|
cthokala
New User
Joined: 24 Oct 2007 Posts: 3 Location: JBurg
|
|
|
|
Hi Vasanth,
Thanks.
The job abend with S722, even though its abending I am getting mail with 1988 records only.
Chandra |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
Hi,
S722 - TIMEOUT (OUTPUT LIMIT REACHED, JOB EXCEEDED NUMBER OF ALLOWABLE LINES)
Maybe try to add a JOBPARM after the jobcard, it MIGHT work
Code: |
/*JOBPARM LINES=999999 |
|
|
Back to top |
|
|
|