MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to send email with dataset as a text file.

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
tvssv
Beginner


Joined: 11 Mar 2009
Posts: 58
Topics: 25

PostPosted: Mon Jul 15, 2019 8:04 am    Post subject: How to send email with dataset as a text file. Reply with quote

Hi,

Please help me out with JCL to send the report generated in job as a text file attachement to recepients.

Thanks & Regards
Jagan
_________________
Thanks
TVSSV
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12354
Topics: 75
Location: San Jose

PostPosted: Mon Jul 15, 2019 9:13 am    Post subject: Reply with quote

tvssv,

You have been a member for more than a decade and yet you post like a newbie. Sad Please search before posting. check this link

http://www.mvsforums.com/helpboards/viewtopic.php?t=439&highlight=attachment
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tvssv
Beginner


Joined: 11 Mar 2009
Posts: 58
Topics: 25

PostPosted: Tue Jul 16, 2019 5:15 am    Post subject: Reply with quote

Hi Kolusu,

Thank You. You are Super.

With the help of your link I have coded the below JCL control cards.

Code:

HELO SYSA                                                           
MAIL FROM: <email>                       
RCPT TO: <email>                         
DATA                                                                 
FROM: <email>                           
TO: <email>                             
SUBJECT: XXXXXX WEEKLY REPORT                           
MIME-VERSION:1.0                                                     
CONTENT-TYPE:MULTIPART/MIXED;BOUNDARY=MIME_BOUNDARY                 
                                                                     
--MIME_BOUNDARY                                                     
CONTENT-TYPE:TEXT/PLAIN                                             
CONTENT-DISPOSITION:INLINE                                           
<PRE> <FONT FACE="ARIAL" SIZE=24>                                   
                                                                               
THIS IS AN AUTOMATED MESSAGE GENERATED FROM THE MVS JOB XXXXXX.               
                                                                               
THE ATTACHMENT IN THIS EMAIL CONSISTS OF  WEEKLY  FTP TIMES.
                                                                               
--MIME_BOUNDARY                                                               
CONTENT-DISPOSITION: ATTACHMENT;FILENAME="WEEKLY_MIDT_FTP_TIMES.TXT"           
CONTENT-TYPE: TEXT                                                             


This is working perfectly. It is sending the attachment and inline text in email. But I did not see the effect of
Code:

<PRE> <FONT FACE="ARIAL" SIZE=24>


I am not getting any error also. Actually where this will get into effect is it is in applicable to text in attachment or for the text in email.

How to change the font in attachement and the text in email. Please advise.

Thanks
TVSSV
_________________
Thanks
TVSSV
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12354
Topics: 75
Location: San Jose

PostPosted: Tue Jul 16, 2019 7:24 am    Post subject: Reply with quote

tvssv wrote:
Hi Kolusu,

Thank You. You are Super.


I would appreciate if you can drop the superlatives. Thanks.

tvssv wrote:

This is working perfectly. It is sending the attachment and inline text in email. But I did not see the effect of
Code:

<PRE> <FONT FACE="ARIAL" SIZE=24>


I am not getting any error also. Actually where this will get into effect is it is in applicable to text in attachment or for the text in email.

How to change the font in attachement and the text in email. Please advise.

Thanks
TVSSV


You do realize that text files do not have metadata like font, color or any other attributes. Your text editors like notepad/wordpad have the ability to change the font and size.

If you want font and colors to your attachment then you either need to print the report as PDF or doc or generate the report as HTML.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tvssv
Beginner


Joined: 11 Mar 2009
Posts: 58
Topics: 25

PostPosted: Tue Jul 16, 2019 10:18 am    Post subject: Reply with quote

Hi Kolusu,

Thank You.

It would be great help if you could provide any document related to this.

How to send the report as PDF or doc. Please advise. Is it possible to send in excell format as well?

Thanks
TVSSV
_________________
Thanks
TVSSV
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12354
Topics: 75
Location: San Jose

PostPosted: Tue Jul 16, 2019 4:11 pm    Post subject: Reply with quote

tvssv wrote:
Hi Kolusu,

Thank You.

It would be great help if you could provide any document related to this.

How to send the report as PDF or doc. Please advise. Is it possible to send in excell format as well?

Thanks
TVSSV


Sigh* You could have helped your self if you followed my earlier suggestion of searching this board.

<Repeat mode on>

Please search before posting. check this link

<Repeat mode off>

http://www.mvsforums.com/helpboards/viewtopic.php?p=40338
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
tvssv
Beginner


Joined: 11 Mar 2009
Posts: 58
Topics: 25

PostPosted: Wed Jul 17, 2019 9:21 am    Post subject: Reply with quote

Hi Kolusu,

Thank You.

My requirement is to send the file in excell format. Is it possible. I have searched but I did not found. May be my search string is not correct. I searched as "text file as excel attachement"

Please help.

Thanks
_________________
Thanks
TVSSV
Back to top
View user's profile Send private message
Robert Sample
Beginner


Joined: 15 Dec 2009
Posts: 12
Topics: 0
Location: Atlanta

PostPosted: Wed Jul 17, 2019 10:23 am    Post subject: Reply with quote

Quote:
My requirement is to send the file in excell format. Is it possible.
That depends upon what you mean by "excell" (sic) format -- a comma-delimited sequential file can be converted in Excel quickly and easily. If you mean a native Excel .xls (or some variant), then the answer is … maybe. SAS can use ODS to generate Excel on the mainframe. If you don't have SAS, then you may need to find and download the Microsoft output file format document for Excel (which ran over 1,000 pages the last time I checked in 2012) and use that as a guideline to write code to convert your report into .xls (or .xlsx) and then transfer it to a PC.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12354
Topics: 75
Location: San Jose

PostPosted: Thu Jul 18, 2019 8:23 am    Post subject: Reply with quote

tvssv wrote:
Hi Kolusu,

Thank You.

My requirement is to send the file in excell format. Is it possible. I have searched but I did not found. May be my search string is not correct. I searched as "text file as excel attachement"

Please help.

Thanks


tvssv,

As Robert mentioned, creating a simple CSV file from a mainframe file is quite simple. we can add the delimiter(for example tab char CHR(9)) as a header and if you FTP it to the PC and save as .xls and you should be able to open with Excel
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu Jul 18, 2019 9:00 am    Post subject: Reply with quote

Kolusu, I dont know how you searched but when I use keyword TXT2PDF and Author Kolusu and search forum Utilities I get no hits.

I want to update that thread as the first link does not work. In fact, I cannot find the link to download the file on that website. The documentation link still works. I found a link to a tar.gz file on another site
https://homerow.net/files/txt2pdf-19.113.tar.gz
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12354
Topics: 75
Location: San Jose

PostPosted: Fri Jul 19, 2019 6:43 am    Post subject: Reply with quote

Nic Clouston wrote:
Kolusu, I dont know how you searched but when I use keyword TXT2PDF and Author Kolusu and search forum Utilities I get no hits.

I want to update that thread as the first link does not work. In fact, I cannot find the link to download the file on that website. The documentation link still works. I found a link to a tar.gz file on another site
https://homerow.net/files/txt2pdf-19.113.tar.gz


Nic,

I searched for PDF and author as kolusu and it did find the link mentioned above.

Thanks for bringing it to my attention that links is broken

All of tools from Lionel Dyck are found here

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

The link you posted is from the original author and I believe Lionel made more changes to it.
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Fri Jul 19, 2019 7:51 am    Post subject: Reply with quote

Interesting. Keyword 'txt2pdf' Author 'kolusu'. If I check 'Search topic titles and message text' I get no hits. If I check 'search message text' I get the result I want. It obviously does not search the message text if the keyword is not found in the title. Not what I expected.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group