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

1st Line s missing in SMTP


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 275
Location: Mumbai

PostPosted: Fri May 03, 2013 3:19 pm
Reply with quote

Hi All,

I tried searching this forum to get this query resolved but I am not able to get correct answer

I apologize in advance if this a repetitive post

I am trying to send email with attachment through JCL and it working fine the only issue is first line from the dataset is missing in attachment.

if I repeat the same same line twice in input dataset then I am getting only one line

Below is the JCL and header file I am using

JCL
Code:
//MAILSTEP EXEC PGM=IEBGENER
//SYSABEND DD   SYSOUT=*
//SYSTOTAL DD   SYSOUT=*
//SYSLIST  DD   SYSOUT=*
//SYSPRINT DD   SYSOUT=*
//SYSUT2   DD   SYSOUT=(B,SMTP)
//SYSIN    DD   DUMMY
//SYSUT1   DD   DISP=SHR,DSN=<Header File>
//         DD   DISP=SHR,DSN=<Attachment Data>
//         DD   DISP=SHR,DSN=<dot File>


Header file
Code:
HELO MVSHOST
MAIL FROM:<abc@xyz.com>
RCPT TO:<abc@xyz.com>
DATA
FROM: <abc@xyz.com>
TO:<abc@xyz.com>
SUBJECT: TEST
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
This is for SMTP
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT;FILENAME="SMTP.CSV"


I am not able to figure out what I am missing here.

Kindly guide me on this

Regards,
Chandan
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri May 03, 2013 4:22 pm
Reply with quote

Hi Chandan,

How are you! icon_smile.gif

In the "Header file", have a "Blank-line" after CONTENT DISPOSITION, as shown below, and try again
Code:
HELO MVSHOST
MAIL FROM:<abc@xyz.com>
RCPT TO:<abc@xyz.com>
DATA
FROM: <abc@xyz.com>
TO:<abc@xyz.com>
SUBJECT: TEST
MIME-VERSION: 1.0
CONTENT-TYPE: MULTIPART/MIXED; BOUNDARY="SIMPLE BOUNDARY"
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
This is for SMTP
--SIMPLE BOUNDARY
CONTENT-TYPE: TEXT/PLAIN
CONTENT-DISPOSITION: ATTACHMENT;FILENAME="SMTP.CSV"
                                                                                           
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 275
Location: Mumbai

PostPosted: Fri May 03, 2013 4:57 pm
Reply with quote

Hi Anuj,

I am doing good. How are you?

Thanks and its working as expected.

I tried inserting a blank line earlier and some how it was not working. I must be missing something that time

Thanks again

Regards,
Chandan
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Fri May 03, 2013 5:07 pm
Reply with quote

SMTP parameters are quite sensitive - however, glad that you got it working!
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 275
Location: Mumbai

PostPosted: Fri May 03, 2013 5:26 pm
Reply with quote

yes Agree with you.. We need to be extra careful while working with SMTP
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 Write line by line from two files DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts rewrite same SAY line CLIST & REXX 8
No new posts Merge files with a key and insert a b... DFSORT/ICETOOL 6
No new posts Repeat a DD line- comment and insert ... CA Products 3
Search our Forums:

Back to Top