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

Problem in sending emails through JCL.


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

New User


Joined: 07 Mar 2006
Posts: 16

PostPosted: Thu Mar 01, 2007 6:05 pm
Reply with quote

Hi,

I am using a below JCL code to send email:

Code:

//SENDNOTE EXEC PGM=IEBGENER
//SYSIN    DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT2   DD SYSOUT=(B,SMTP)
//SYSUT1   DD *
helo MVSHOST
mail from:<MVSUser@MVSHost.xyz.com>
rcpt to:<recieverid@yahoo.com>
data
From:     MVSUser@MVSHost.xyz.com
To:       recieverid@yahoo.com
Subject:  Test message from MVS using SMTP

This is a test email.
Regards,
Nitin.


Although i am recieving the email but the email is coming with a BLANK subject line and body of email is also BLANK. i.e no text appears inside email.

Can any one please tell me why i am not getting the subject line and email text mentioned in JCL when i recieve the email?
Back to top
View user's profile Send private message
asridhar

New User


Joined: 04 May 2005
Posts: 5
Location: Hyderabad

PostPosted: Thu Mar 15, 2007 3:34 pm
Reply with quote

Hi
Can you please explain me this MVSUser@MVSHost.xyz.com ..is this MVSUSER our RACFID and MVSHOST is our system which we are working on the system.

When am trying with your code am not getting any result..

could you please explain me exactly what you are looking?

Thanks
Sagar
Back to top
View user's profile Send private message
prakash.ammasi

New User


Joined: 04 Apr 2007
Posts: 8
Location: chennai

PostPosted: Thu May 17, 2007 11:50 am
Reply with quote

www.dnsstuff.com/
and find for the IPWHOIS Lookup
give u r IP there it wil give u r server details, NameServer

then find for DNS Report in the main page it gives the Host mail id
Back to top
View user's profile Send private message
ramfrom84

New User


Joined: 23 Aug 2006
Posts: 93
Location: chennai

PostPosted: Thu May 17, 2007 1:13 pm
Reply with quote

Hi All,

What is MVSUser@MVSHost.xyz.com , i test the sample JCL , i m not getting Even Blank Mail. Can u please explain in More details about this JCL . It would be helpful for Us...

Thanks........
Back to top
View user's profile Send private message
prakash.ammasi

New User


Joined: 04 Apr 2007
Posts: 8
Location: chennai

PostPosted: Thu May 17, 2007 1:33 pm
Reply with quote

i do have the same question MVSUser@MVSHost.xyz.com means ???

my jcl running fine but SYSPRINT shows

DATA SET UTILITY - GENERATE
IEB352I WARNING: ONE OR MORE OF THE OUTPUT DCB PARMS COPIED FROM INPUT

PROCESSING ENDED AT EOD
Back to top
View user's profile Send private message
shane

New User


Joined: 17 May 2007
Posts: 11
Location: Phoenix,Arizona

PostPosted: Thu May 17, 2007 1:34 pm
Reply with quote

Hi Nitin,

I think this codes should work with some minor changes in the JCl as said by prakash,
Back to top
View user's profile Send private message
shane

New User


Joined: 17 May 2007
Posts: 11
Location: Phoenix,Arizona

PostPosted: Thu May 17, 2007 1:40 pm
Reply with quote

Hi,

Check this out for reference n help.

ibmmainframes.com/viewtopic.php?t=10808&highlight=sending+mail
Back to top
View user's profile Send private message
bhim_s

New User


Joined: 19 Sep 2006
Posts: 46
Location: New Delhi

PostPosted: Thu May 17, 2007 1:47 pm
Reply with quote

TRY THIS...

Code:
//SENDNOT    EXEC PGM=SYNCGENR                     
//SYSOUT   DD   SYSOUT=*                         
//SYSPRINT DD   SYSOUT=*                         
//SYSUDUMP DD   SYSOUT=*                         
//SYSUT1   DD   *                                 
HELO MVSHOST                                       
MAIL FROM:<sender's mail id>     
RCPT TO:<receiver's mail id>                     
DATA                                             
TO: ABC <receiver's mail id>       
FROM: sender's mail id
SUBJECT: TEST MAIL...                             
*******************                               
BHIM.                                               
/*                                                     
//SYSUT2   DD   SYSOUT=(B,SMTP)                         
//*



Bhim
Back to top
View user's profile Send private message
ramfrom84

New User


Joined: 23 Aug 2006
Posts: 93
Location: chennai

PostPosted: Thu May 17, 2007 4:47 pm
Reply with quote

I try Both the , The job run fine ,But i didnot get mail.
Back to top
View user's profile Send private message
shane

New User


Joined: 17 May 2007
Posts: 11
Location: Phoenix,Arizona

PostPosted: Thu May 17, 2007 4:55 pm
Reply with quote

Are you following the guidelines as described in the below links

www.planetmvs.com/mvsmail/


publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/F1A1B950/6.22?DT=20050708142126
Back to top
View user's profile Send private message
prakash.ammasi

New User


Joined: 04 Apr 2007
Posts: 8
Location: chennai

PostPosted: Thu May 17, 2007 4:58 pm
Reply with quote

hi ramfrom84,

try this .....

**** WORING FINE *********

//TESTJCL JOB ('CGAT01',013),'PRAKASH',
// MSGCLASS=T,CLASS=T,NOTIFY=USERID,REGION=4M
//SENDNODE EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSUT1 DD *
HELO MVSHOST
MAIL FROM:<PRAKASH.AMMASI@XYX.COM>
RCPT TO:<PETER@ABC.COM>
DATA
FROM:<PRAKASH.AMMASI@XYZ.COM>
TO:<PETER@ABC.COM>
SUBJECT: TEST MAIL FROM JCL
HI PETER THIS IS A TEST MAIL....
/*


AND I GOT THIS MAIL .........

Subject: Undeliverable Mail

Unable to deliver mail to some/all recipients.
050 DATA 00020002
501 Syntax Error. No Args after 'DATA' command
050 FROM:<PRAKASH.AMMASI@XYX.COM> 00030002
500 Unknown command, 'FROM'
050 TO:<PETER@ABC.COM> 00040002
500 Unknown command, 'TO'
050 SUBJECT: TEST MAIL FROM JCL. 00050002
500 Unknown command, 'SUBJECT'
050 HI PETER THIS IS A TEST MAIL.... 00084002
500 Unknown command, 'HI'

** Text of Mail follows **
HELO MVSHOST 00008002
MAIL FROM:<PRAKASH.AMMASI@XYX.COM> 00009002
RCPT TO:<PETER@ABC.COM> 00010002
DATA 00020002
FROM:<PRAKASH.AMMASI@XYX.COM> 00030002
TO:<PETER@ABC.COM> 00040002
SUBJECT: TEST MAIL FROM JCL. 00050002
HI PETER THIS IS A TEST MAIL.... 00084002
Back to top
View user's profile Send private message
ramfrom84

New User


Joined: 23 Aug 2006
Posts: 93
Location: chennai

PostPosted: Thu May 17, 2007 5:22 pm
Reply with quote

I try ur Code , But i not get the mail , return code is 0,Please see my output.Please advise where i went wrong , and my jcl is MENTION BELOW

Code:

//TESTJCL4 JOB (12345),'JCL',CLASS=A,     
//           MSGCLASS=X,NOTIFY=TESSTJCL,   
//           MSGLEVEL=(1,1),             
//*                                       
//SENDNODE EXEC PGM=IEBGENER             
//SYSIN DD DUMMY                         
//SYSPRINT DD SYSOUT=*                   
//SYSUT2 DD SYSOUT=(B,SMTP)               
//SYSUT1 DD *                             
HELO MVSHOST                             
MAIL FROM:<RSANKAR@YAHOO.COM>           
RCPT TO:<RSANKAR@YAHOO.COM>             
DATA                                     
FROM:<RSANKAR@YAHOO.COM>               
TO:<RSANKAR@YAHOO.COM>                 
SUBJECT: TEST MAIL FROM JCL               
HI PETER THIS IS A TEST MAIL....         
/*                               
         




SYSPRINT details
Code:

DATA SET UTILITY - GENERATE                                             
IEB352I WARNING: ONE OR MORE OF THE OUTPUT DCB PARMS COPIED FROM INPUT 
                                                                       
PROCESSING ENDED AT EOD                                                 


SYSUT2 details :

Code:

HELO MVSHOST                   
MAIL FROM:<RSANKAR@yahoo.COM>
RCPT TO:<RSANKAR@yahoo.COM>   
DATA                           
FROM:<RSANKAR@yahoo.COM>     
TO:<RSANKAR@yahoo.COM>       
SUBJECT: TEST MAIL FROM JCL     
HI PETER THIS IS A TEST MAIL....
Back to top
View user's profile Send private message
prakash.ammasi

New User


Joined: 04 Apr 2007
Posts: 8
Location: chennai

PostPosted: Thu May 17, 2007 5:27 pm
Reply with quote

KINDLY CHECK THIS LINK ....

www.csuhayward.edu/FOCUS/mvsmail.ppt
Back to top
View user's profile Send private message
paray2x

New User


Joined: 28 Dec 2005
Posts: 21

PostPosted: Fri May 18, 2007 4:16 pm
Reply with quote

nitinkhobragade1,

If your site supports it, you can use XMITIP program to send e-mails from batch. Its a freeware and wasy to use.

Refer the user guide at

Use [URL] BBCode for External Links

Thanks
Back to top
View user's profile Send private message
paray2x

New User


Joined: 28 Dec 2005
Posts: 21

PostPosted: Fri May 18, 2007 4:17 pm
Reply with quote

Sorry, The above message should read

"Its a freeware and easy to use. "
Back to top
View user's profile Send private message
ramfrom84

New User


Joined: 23 Aug 2006
Posts: 93
Location: chennai

PostPosted: Fri May 18, 2007 5:35 pm
Reply with quote

Thanks prakash.ammasi for the material about sending Mail .

I have a question for u ?

How can i find the HOST Name, I have problem with it.Help me Out...


Thanks in advance,..,
Back to top
View user's profile Send private message
prakash.ammasi

New User


Joined: 04 Apr 2007
Posts: 8
Location: chennai

PostPosted: Fri May 18, 2007 6:06 pm
Reply with quote

hi this is the JCL below

IF U WANT TO FIND THE "MVSHOST" (on the "helo MVSHOST" line) must match the JES Node name for your system as defined in your 'SYS1.PARMLIB(IEFSSNxx)' for the VMCF subsystem. If you are a JES2 site, look at any JES2 job log for the node name at the top after "N O D E".


//TESTJCL JOB ('GGOT32',013),'PRAKASH',
// MSGCLASS=T,CLASS=T,NOTIFY=C33SMSY,REGION=4M
//SENDNODE EXEC PGM=IEBGENER
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSUT1 DD *
HELO MVSHOST
MAIL FROM:<PRAKASH@ABC.COM>
RCPT TO:< PRAKASH@ABC.COM>
DATA
FROM:<PRAKASH@ABC.COM>
TO:<PRAKASH@ABC.COM>
SUBJECT: TEST MAIL FROM JCL
HI THIS IS A TEST MAIL....
/*
Back to top
View user's profile Send private message
ramfrom84

New User


Joined: 23 Aug 2006
Posts: 93
Location: chennai

PostPosted: Mon May 21, 2007 3:20 pm
Reply with quote

Hi ,
I m not habving permission for this PDS SYS1.PARMLIB, Is there no way to find the MVS Host id.
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: Tue May 22, 2007 4:13 am
Reply with quote

Hello,

You might talk with your network or system support people. They will know the info you want.
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 Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts z/vm installation problem All Other Mainframe Topics 0
No new posts Job scheduling problem. JCL & VSAM 9
No new posts Problem with IFTHEN=(WHEN=GROUP,BEGIN... DFSORT/ICETOOL 5
No new posts Need to add field to copybook, proble... COBOL Programming 14
Search our Forums:

Back to Top