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
 

 

Email attachment

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

New User


Joined: 02 Sep 2006
Posts: 31
Location: Mumbai

PostPosted: Fri Aug 07, 2009 1:00 pm    Post subject: Email attachment
Reply with quote

Hi,
I am emailing an attachment thru JCL.
When I send a PDS member, i receive it properly but when i send a PS file (rec length 80), the file received in email is empty.

here's the code inside my card

content-disposition:attachment;
content-type:text/plain;charset=us-ascii;name='ABCD.txt'

can anyone tell me what i need 2 do....

Thanks,
Prasad
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


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

PostPosted: Fri Aug 07, 2009 4:53 pm    Post subject:
Reply with quote

Quote:
can anyone tell me what i need 2 do....
Since you didn't provide us any details about what you've already tried that doesn't work, the general idea is after your content type statement, your next JCL statement will be a DD name pointing to the file you want to be the attachment, and then a DD name that points to a file that contains a single period in the first byte of the line and nothing else (no line number -- nothing). Your SMTP commands, the file to be the attachment, and the file with the period must all be the same record length and the record length cannot exceed 1000 bytes -- 998 if you allow for the carriage return / line feed required on some systems. This is been done and tested by me on numerous occasions, using both sequential and PDS file members, so it is a known, proven method.
Back to top
View user's profile Send private message
prasadplease

New User


Joined: 02 Sep 2006
Posts: 31
Location: Mumbai

PostPosted: Fri Aug 07, 2009 4:57 pm    Post subject: Reply to: Email attachment
Reply with quote

Hi Robert,
Thanks for the reply....
I have got it working now
but there's another problem.
my attachment is getting named automatically like 'AT1725623.txt' some random number every time

I tried everything in the book but I'm unable to have the attachment with the name I want. My end goal is to name it as '.csv' so as to have the file format in mail as .csv

the books and internet posts say that
CONTENT-DISPOSITION: ATTACHMENT; FILENAME=FILE.TXT
should work...but it doesn't.
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 07, 2009 9:42 pm    Post subject:
Reply with quote

Hello,

Quote:
what do u think is going wrong....

Suggest you post your jcl and contorl statements.
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 Reading data from PS file and send it... rajatbagga All Other Mainframe Topics 18 Fri Sep 23, 2016 12:51 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 Email trigger through JCL Madhusudhan Prahlad JCL & VSAM 10 Mon Aug 31, 2015 3:43 pm
No new posts Empty excel attachment in mail receiv... gs185008 COBOL Programming 8 Mon Jul 13, 2015 7:45 pm


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