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

Email attachment


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

PostPosted: Fri Aug 07, 2009 4:53 pm
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
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

Moderator Emeritus


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

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

 


Similar Topics
Topic Forum Replies
No new posts mail attachment with excel format All Other Mainframe Topics 2
No new posts REXX to send an email in Mainframe wi... CLIST & REXX 3
No new posts REXX to send an email in Mainframe CLIST & REXX 4
No new posts Problem while sending special charact... JCL & VSAM 4
No new posts TXT2PDF and then SMTP email a PDF JCL & VSAM 4
Search our Forums:

Back to Top