Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to send mail using JCL
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
replytovishu

New User


Joined: 09 Dec 2008
Posts: 23
Location: india

PostPosted: Tue Feb 23, 2010 1:43 pm    Post subject: How to send mail using JCL
Reply with quote

Hi All,

How to send mail from mainframe using JCL in RTF format?

Regards, Vishal
Back to top
View user's profile Send private message

replytovishu

New User


Joined: 09 Dec 2008
Posts: 23
Location: india

PostPosted: Tue Feb 23, 2010 1:52 pm    Post subject:
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Tue Feb 23, 2010 3:30 pm    Post subject:
Reply with quote

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
View user's profile Send private message
replytovishu

New User


Joined: 09 Dec 2008
Posts: 23
Location: india

PostPosted: Tue Feb 23, 2010 4:35 pm    Post subject:
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Tue Feb 23, 2010 5:03 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Tue Feb 23, 2010 5:47 pm    Post subject:
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Feb 23, 2010 6:07 pm    Post subject: Reply to: How to send mail from mainframe using JCL in RTF f
Reply with quote

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
View user's profile Send private message
replytovishu

New User


Joined: 09 Dec 2008
Posts: 23
Location: india

PostPosted: Wed Feb 24, 2010 11:51 am    Post subject:
Reply with quote

//*----------------------------------------------------------
//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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Feb 24, 2010 12:48 pm    Post subject:
Reply with quote

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
View user's profile Send private message
replytovishu

New User


Joined: 09 Dec 2008
Posts: 23
Location: india

PostPosted: Wed Feb 24, 2010 4:29 pm    Post subject:
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Feb 24, 2010 5:22 pm    Post subject:
Reply with quote

This link has the details,
https://www.uic.edu/depts/accc/newsletter/adn13/mime.html
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Wed Feb 24, 2010 5:54 pm    Post subject:
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Wed Feb 24, 2010 6:39 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


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

PostPosted: Wed Feb 24, 2010 8:51 pm    Post subject:
Reply with quote

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
View user's profile Send private message
replytovishu

New User


Joined: 09 Dec 2008
Posts: 23
Location: india

PostPosted: Thu Feb 25, 2010 1:45 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Feb 25, 2010 2:37 pm    Post subject:
Reply with quote

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
View user's profile Send private message
replytovishu

New User


Joined: 09 Dec 2008
Posts: 23
Location: india

PostPosted: Thu Feb 25, 2010 2:52 pm    Post subject:
Reply with quote

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
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Thu Feb 25, 2010 7:00 pm    Post subject:
Reply with quote

Glad to hear you got it sorted icon_smile.gif
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

PostPosted: Mon Mar 01, 2010 6:08 pm    Post subject:
Reply with quote

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:
http://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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Mon Mar 01, 2010 8:17 pm    Post subject:
Reply with quote

Uh, HTML is plain text -- it encodes the layout using no non-display characters, right?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Reading data from PS file and send it... rajatbagga All Other Mainframe Topics 18 Fri Sep 23, 2016 12:51 pm
No new posts Send parameter for macro STIMERM from... Daniel Teolotitla PL/I & Assembler 13 Tue Jul 05, 2016 9:23 pm
No new posts How to send email with Rich Text usin... santhosh5983 JCL & VSAM 4 Fri Apr 08, 2016 2:30 am
No new posts Issue in sending zip file as mail att... ajithajt JCL & VSAM 8 Thu Apr 07, 2016 9:11 am
No new posts Trigger a mainframe job by mail Praveen Thenraj IBM Tools 8 Wed Jan 13, 2016 12:05 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us