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
 

 

1st Line s missing in SMTP

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

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Fri May 03, 2013 3:19 pm    Post subject: 1st Line s missing in SMTP
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

Senior Member


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

PostPosted: Fri May 03, 2013 4:22 pm    Post subject:
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: 269
Location: Mumbai

PostPosted: Fri May 03, 2013 4:57 pm    Post subject:
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

Senior Member


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

PostPosted: Fri May 03, 2013 5:07 pm    Post subject:
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: 269
Location: Mumbai

PostPosted: Fri May 03, 2013 5:26 pm    Post subject:
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    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 Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm
No new posts Fault Analyser - missing code explana... egrove IBM Tools 1 Thu Aug 11, 2016 5:55 pm
No new posts Missing Java main class akg Java & MQSeries 3 Wed May 25, 2016 4:05 pm
No new posts “Carriage Return” is missing in f... sudha_be02 JCL & VSAM 1 Mon Feb 15, 2016 5:04 pm
No new posts ISREDIT - Position Cursor on the Comm... Tarique Anwer TSO/ISPF 5 Wed Feb 03, 2016 12:44 pm


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