IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Sending Mail with file attahment as PDF


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Aug 31, 2012 9:24 pm
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

Moderator Emeritus


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

PostPosted: Fri Aug 31, 2012 9:26 pm
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: 1742
Location: Tirupur, India

PostPosted: Fri Aug 31, 2012 9:30 pm
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top