MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Subject not displayed in the mail sent via SMTP

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
mf_learner
Beginner


Joined: 04 May 2006
Posts: 11
Topics: 4

PostPosted: Tue May 16, 2006 3:50 am    Post subject: Subject not displayed in the mail sent via SMTP Reply with quote

Hi,

I am using the following JCL for sending mail via SMTP. I am getting the mails, but the Subject line is not getting resolved and is displayed as blank.

Code:

//MAIL001  EXEC PGM=IEBGENER                                 
//SYSIN    DD  DUMMY                                         
//SYSPRINT DD  SYSOUT=*                                       
//SYSUT2   DD  SYSOUT=(B,SMTP)                               
//SYSOUT   DD  SYSOUT=*                                       
//SYSUT1   DD  *                                             
     HELO MVSB.xyz.COM                                     
     MAIL FROM:<abc>                 
     RCPT TO:<def>                   
     DATA                                                     
     TO:<def>                       
     SUBJECT:List of new customers.                           
     
     This is the file of new customers.                       
     The fields are CUST-NBR, CMPNY-NAME, CLASSS-OF-TRADE,   
                    AREA-CHANNEL-DESC, TRADING-AREA-DESC,     
                    AND THE CUSTOMERS MAINT DATE.
               
/*
//*


The mail is sent but the Subject is not getting resolved.
I checked out in the Options tab of the mail that I got, and in the Internet Header area, I found the following message -
Code:

Received: from KFNASMTP01.xyz.com (kfexchsmtp.xyz.com [151.237.30.45]) by usknausglvimc01.us.pm.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2687.74)
            id FSRG1RVY; Tue, 16 May 2006 03:14:54 -0500
Received: from MVSB.xyz.COM ([152.157.280.9]) by KFNASMTP01.xyz.com with InterScan Messaging Security Suite; Tue, 16 May 2006 03:14:53 -0500
Received: from MVSB.xyz.COM by MVSB.xyz.COM (IBM MVS SMTP CS V1R4) with BSMTP id JOB25729; Tue, 16 May 06 03:14:51 CST
     TO:<def>
     SUBJECT:List of new customers.
Date: Tue, 16 May 06 03:14:51 CST   
From: <abc>


I also checked the logfile for the smtp job that runs and it shows the following message -
Code:

EZA5460I 05/16/06 03:02:43 BSMTP Helo Domain: MVSB.xyz.COM Yours too, I see! 
EZA5474I 05/16/06 03:02:43 Received Note 00000390 via BSMTP From <abc>
EZA5476I 05/16/06 03:02:45 Delivered Note 00000390 to <def>


Posting this after having searched similar threads in this forums (like http://www.mvsforums.com/helpboards/viewtopic.php?t=439&highlight=attachment and http://www.mvsforums.com/helpboards/viewtopic.php?t=3223&highlight=jcl+email). I couldnt get any leads to my problem though. Please note that in this post, I had to change the actual id's by abc, xyz and def.

Could anyone provide any leads as to what is happening?
_________________
Thanks
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue May 16, 2006 6:56 am    Post subject: Reply with quote

mf_learner,

Make sure that you don't have garbage in bytes 73 thru 80 on the subject line. You should have spaces in those bytes.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mf_learner
Beginner


Joined: 04 May 2006
Posts: 11
Topics: 4

PostPosted: Tue May 16, 2006 7:04 am    Post subject: Reply with quote

I checked out that as well.....There arent any garbage values in 73-80 bytes on the subject line. All are blank.

Am I missing any params?......I believe Subject is not getting resolved itself.....
_________________
Thanks
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Tue May 16, 2006 7:34 am    Post subject: Reply with quote

mf_learner,

Run this step as is just by changing the following

Code:

RCPT TO: <mf_learner> 
TO: <mf_learner>


Just put your real email address in there and make sure to enclose your email adress within <>

Code:

//STEP0100 EXEC PGM=IEBGENER                             
//SYSPRINT DD SYSOUT=*
//SYSUT2   DD SYSOUT=(B,SMTP)                           
//SYSIN    DD DUMMY                                     
//SYSUT1   DD *                                         
HELO MVSB
MAIL FROM: <kolusu>       
RCPT TO: <mf_learner>                                 
DATA                                                     
TO: <mf_learner>
SUBJECT:List of new customers.
//         DD *   
     This is the file of new customers.                       
     The fields are CUST-NBR, CMPNY-NAME, CLASSS-OF-TRADE,   
                    AREA-CHANNEL-DESC, TRADING-AREA-DESC,     
                    AND THE CUSTOMERS MAINT DATE.
                                   
//*   


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
mf_learner
Beginner


Joined: 04 May 2006
Posts: 11
Topics: 4

PostPosted: Tue May 16, 2006 7:58 am    Post subject: Reply with quote

It worked with a little change, Kolusu. But, there is a problem that still persists.

I had to do a little bit of modification, because with the second instream data, the body of the mail was coming as the subject.

So, I did it like this -

//SYSUT1 DD *
HELO MVSB
MAIL FROM: <kolusu>
RCPT TO: <mf_learner>
DATA
TO: <mf_learner>
SUBJECT:List of new customers.
// DD *

//*

I got the mail with the Subject as desired. But, at the cost of the mail body.

So, I went ahead and added the body as another instream data -

//SYSUT1 DD *
HELO MVSB
MAIL FROM: <kolusu>
RCPT TO: <mf_learner>
DATA
TO: <mf_learner>
SUBJECT:List of new customers.
// DD *

// DD *
This is the file of new customers.
The fields are CUST-NBR, CMPNY-NAME, CLASSS-OF-TRADE,
AREA-CHANNEL-DESC, TRADING-AREA-DESC,
AND THE CUSTOMERS MAINT DATE.


Now, I am getting the mail body at the cost of the Subject.
I.e, either of them are coming. Not both at the same time.
Down the line, I need to concat two files along with these. But, unless this gets resolved, I cannot do that.

Thanks.
_________________
Thanks
Back to top
View user's profile Send private message
mf_learner
Beginner


Joined: 04 May 2006
Posts: 11
Topics: 4

PostPosted: Tue May 16, 2006 8:20 am    Post subject: Reply with quote

This issue is also resolved now.

I had to add a blank line before the mail body and after the second DD * statement.
I am now getting the Subject as well as the body.

//SYSUT1 DD *
HELO MVSB
MAIL FROM: <kolusu>
RCPT TO: <mf_learner>
DATA
TO: <mf_learner>
SUBJECT:List of new customers.
// DD *

This is the file of new customers.
The fields are CUST-NBR, CMPNY-NAME, CLASSS-OF-TRADE,
AREA-CHANNEL-DESC, TRADING-AREA-DESC,
AND THE CUSTOMERS MAINT DATE.


Thanks a lot for your help, Kolusu.
_________________
Thanks
Back to top
View user's profile Send private message
mf_learner
Beginner


Joined: 04 May 2006
Posts: 11
Topics: 4

PostPosted: Thu May 18, 2006 2:00 am    Post subject: Reply with quote

Opening this thread once again because I am getting the same problem of not getting the Subject line displayed when I am using the data through card instead of passing instream(which had worked). The cards are 80 bytes in length.
I used two cards to have the DATA section separetely, but it is still not resolving.

The subject line is just coming as blanks.

For the code, refer to the same code as I have posted top, just replace the instream data passed from SYSUT1 DD * by SYSUT1 DD DSN=aa.bb.cc,disp=shr

Any clues....
_________________
Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group