View previous topic :: View next topic
|
Author |
Message |
prasadplease
New User
Joined: 02 Sep 2006 Posts: 31 Location: Mumbai
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
prasadplease
New User
Joined: 02 Sep 2006 Posts: 31 Location: Mumbai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
what do u think is going wrong.... |
Suggest you post your jcl and contorl statements. |
|
Back to top |
|
|
|