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
 

 

Sending Mail with file attahment as PDF

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
prabu.sivaram

New User


Joined: 21 Feb 2011
Posts: 8
Location: Chennai

PostPosted: Fri Aug 31, 2012 8:58 pm    Post subject: Sending Mail with file attahment as PDF
Reply with quote

Hello Folks,

I am trying to find a way to send a mail to other user with file attachment as PDF.

Initially i decoded the PS file from EBCDIC to ASCII format and tried to send the same to user with IEBGENER utility.

Following is the Encoding used for PDF attachment.

CONTENT-TYPE: application/pdf; NAME="Batch_Stat.pdf"
CONTENT-TRANSFER-ENCODING: BINARY
CONTENT-DISPOSITION: ATTACHMENT

Finally i got the mail with file attachment as PDF..But if i open the file in adobe reader it is throwing a error as
"Adobe Couldn't open 'Batch_Stat.pdf' because it is not the supported file type or file damaged"

Please help me if i need to do anything before sending as attachment.
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


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

PostPosted: Fri Aug 31, 2012 9:24 pm    Post subject:
Reply with quote

Merely specifying the attachment type as PDF does NOT make the text into a PDF file. Unless you have software on your mainframe that converts text files to PDF files, what you want to do cannot be done. You could read the 756-page specification for PDF files and write a program to run on your mainframe to convert a text file to a PDF, or you could convince your management to buy software from a vendor to do this, or you could realize that you cannot send a PDF file from the mainframe. One of these three WILL happen.
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: Fri Aug 31, 2012 9:26 pm    Post subject:
Reply with quote

Hello,

Simply calling some data .PDF does not convert the data to a PDF - neither in EBCDIC nor ASCII.

If you want a file to be in PDF format, you must pass the data thru some process that does the conversion - then transmit that converted file (as a BINARY file).
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1475
Location: Chennai

PostPosted: Fri Aug 31, 2012 9:30 pm    Post subject:
Reply with quote

Hello,
How is the PDF file generated on mainframe? If the file is just a flat file(PS file) with TEXT in it, then you cannot send it as pdf

You would need a software which generates actual PDF file on mainframe(like SAS) and then you could send it across using the SMTP statements you have shown above.

If you open a .pdf file or .xls file using notepad you can find a lot of fuzzy data in it, this means that the are data crafted in specific format and not plain text.

Edit: Did not see top 2 posts when posting
Back to top
View user's profile Send private message
parsesource

New User


Joined: 06 Feb 2006
Posts: 97

PostPosted: Sun Sep 02, 2012 11:19 pm    Post subject: Reply to: Sending Mail with file attahment as PDF
Reply with quote

The xmitip mail package also includes pdf support (using a free txt2pdf converter)

google for it - easy to find
Back to top
View user's profile Send private message
prabu.sivaram

New User


Joined: 21 Feb 2011
Posts: 8
Location: Chennai

PostPosted: Fri Sep 07, 2012 4:27 pm    Post subject: Reply to: Sending Mail with file attahment as PDF
Reply with quote

Hi All,

Thanks for your support. I will look for ways to convert it into PDF format.

Will post you my findings once completed..
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
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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