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

Send mail from Mainframes - Query


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

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Fri Apr 04, 2008 1:30 pm
Reply with quote

Hi All,

I am trying to send mail from the mainframes. I have added the below step in my PROC.

Code:

//PS0350   EXEC PGM=IEBGENER                             
//SYSPRINT DD SYSOUT=A                                   
//SYSUT2   DD SYSOUT=(B,SMTP)                           
//SYSUT1   DD DSN=USERID.OWN.PARMLIB(MAIL),DISP=SHR
//SYSOUT   DD  SYSOUT=*                                 
//SYSUDUMP DD  SYSOUT=I                             
//SYSIN    DD DUMMY                                     


And in my parm member, i am having the below.

Code:

MAIL FROM: <XXXXXXX@AAAA.COM>         
RCPT TO: <XXXXXXX@AAAA.COM>           
DATA                                                       
DATE: APR 04,2008                                           
FROM: MY NAME <XXXXXXX@AAAA.COM>   
TO: "YYYY" <YYYYYYYY@AAAA.COM>;"ZZZZ"
<ZZZZZ@AAAA>;                       
MY NAME <XXXXXXX@AAAA.COM>;             
SUBJECT: TEST EMAIL
THIS IS A TEST MAIL SENT FROM MAINFRAMES TO THE MAIL ID.



When I execute the above step, the mail was not sent.

But when i had the above step in a separate PDS member, i was able to send mail to myself. But it didn't reach others. Please find the code for the same below.

Code:

//USERID JOB (0000),'SENDING MAIL',CLASS=0,MSGCLASS=U,
//         NOTIFY=&SYSUID                               
//PROGRAM  EXEC PGM=IEBGENER                             
//SYSPRINT DD SYSOUT=A                                   
//SYSIN    DD DUMMY                                     
//SYSUT2   DD SYSOUT=(B,SMTP)                           
//SYSUT1   DD *                                         
MAIL FROM: <XXXXXXX@AAAA.COM>         
RCPT TO: <XXXXXXX@AAAA.COM>           
DATA                                                       
DATE: APR 04,2008                                           
FROM: MY NAME <XXXXXXX@AAAA.COM>   
TO: "YYYY" <YYYYYYYY@AAAA.COM>;"ZZZZ"
<ZZZZZ@AAAA>;                       
MY NAME <XXXXXXX@AAAA.COM>;             
SUBJECT: TEST EMAIL
THIS IS A TEST MAIL SENT FROM MAINFRAMES TO THE MAIL ID.
.                                                       
/*


Please let me know if i need to change any thing else.

Note: Please note the difference between SYSUT1 and SYSIN in both the steps ( I did this change as //SYSUT1 DD * is not allowed inside a PROC)

Agni.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Apr 04, 2008 4:33 pm
Reply with quote

Does the "separate PDS member" work if you use "DSN=USERID.OWN.PARMLIB(MAIL)" instead of "*" for SYSUT1?
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Fri Apr 04, 2008 4:50 pm
Reply with quote

No, its not working.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Apr 04, 2008 6:18 pm
Reply with quote

Does the "separate PDS member" work if you use 80 byte unblocked flat file instead of "*" for SYSUT1?
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Fri Apr 04, 2008 6:43 pm
Reply with quote

Hi,

When i tried to allocate the unblocked dataset, i was not able to open the dataset.

Code:

                            Allocate New Data Set                             
Command ===>                                                                   
                                                                   More:     +
Data Set Name  . . . : USERID.MAIL.FLATFILE                                   
                                                                               
Management class . . . DEV1000        (Blank for default management class)     
Storage class  . . . . DEV1000        (Blank for default storage class)       
 Volume serial . . . . 1MDS27         (Blank for system default volume) **     
 Device type . . . . .                (Generic unit or device address) **     
Data class . . . . . . ADDDSORG       (Blank for default data class)           
 Space units . . . . . TRACK          (BLKS, TRKS, CYLS, KB, MB, BYTES         
                                       or RECORDS)                             
 Average record unit                  (M, K, or U)                             
 Primary quantity  . . 1              (In above units)                         
 Secondary quantity    10             (In above units)                         
 Directory blocks  . . 0              (Zero for sequential data set) *         
 Record format . . . . U                                                       
 Record length . . . . 80                                                     
 Block size  . . . . .                                                         
 Data set name type                   (LIBRARY, HFS, PDS, LARGE, BASIC, *     
                                       EXTREQ, EXTPREF or blank)               
.  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .  .


i tried giving 0 and blanks in the block size.

Please advise.

Thanks
Agni
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Apr 04, 2008 6:45 pm
Reply with quote

Blocksize 80
Record format F
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Fri Apr 04, 2008 7:00 pm
Reply with quote

No CICS Guy. This is also not working. icon_sad.gif
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Apr 04, 2008 7:13 pm
Reply with quote

So the same JCL works when SYSUT1 is instream but not when SYSUT1 is pointing to an 80 byte unblocked flatfile or an 80 byte PDS member, is this correct?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Apr 05, 2008 5:42 am
Reply with quote

Agni,


Try this link ! This shd help !

http://ibmmainframes.com/viewtopic.php?t=7118
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Sat Apr 05, 2008 12:29 pm
Reply with quote

Thanks Aaru. It worked fine after I added my domain. But the mail didn't reach others.

Thanks
Agni.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Apr 05, 2008 4:26 pm
Reply with quote

Agni,

Ideally it should work. Hope you have given the correct email address.
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Tue Apr 08, 2008 9:24 am
Reply with quote

Hi Aaru,

The mail IDs which i gave were correct only. Will there be any reason for this as I was able to receive the mail but others didn't? Should I need to add any thing else in my parm card?

Thanks
Agni.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Apr 09, 2008 1:33 am
Reply with quote

agni,

Is your mail address and the other receipients address in the same domain? say if u r wking for company ABC then try sending mails to the mail id's with domain ABC.com !

This is what i could think of ! I always use IKJEFT01 to send mails instead of IEBGENER.
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Thu Apr 10, 2008 8:42 am
Reply with quote

Aaru,

When I used IKJEFT01 it worked fine icon_smile.gif . Thanks all for your help

Regards
Agni
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Thu Apr 10, 2008 2:25 pm
Reply with quote

You are welc icon_biggrin.gif me
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Tue Apr 22, 2008 8:16 pm
Reply with quote

Hi All,

I am starting this conversation again as i am having some problems in this.

In one of the regions when i used %SMTPSEND, it didn't work and i got the following error.

Code:

1READY                     
 %SMTPSEND                   
 COMMAND SMTPSEND NOT FOUND
 READY                     
 END   


Then I searched the PROCLIB whether is there any PROC step used to send the mail from mainframes. I found that one of the job was using SMTPMAIL. But that job was not running in production. I tested anyway using SMTPMAIL. But it also got failed. I got the below error.


Code:

1READY                     
 SMTPMAIL                   
 COMMAND SMTPMAIL NOT FOUND
 READY                     
 END   


Can anyone help me out on this?

Thanks
Agni
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Tue Apr 22, 2008 9:00 pm
Reply with quote

Hello,

Is there some reason that you are not running this in batch?

My guess is that you are trying to run a proc online and the proclib is not available to your tso session.

I'd suggest you simply submit the jcl and run this in batch.

Maybe there is something i misunderstand. . .
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Wed Apr 23, 2008 3:42 pm
Reply with quote

Hi Dick,

Thanks for your reply. I just ran it in batch only. It was one of the PROC steps. In other regions it is working fine. In this region only, it is not working.

Cheers
Agni
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Wed Apr 23, 2008 11:20 pm
Reply with quote

Hi Agni,

I'd suggest you talk with the system support people as to why this is not available in the region where it is "not found".
Back to top
View user's profile Send private message
Agni

New User


Joined: 22 Nov 2007
Posts: 83
Location: Chennai

PostPosted: Thu Apr 24, 2008 11:32 am
Reply with quote

Thanks Dick. I will do that.

Regards
Agni
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Thu Apr 24, 2008 11:35 am
Reply with quote

You're welcome - good luck icon_smile.gif

I suspect it is a missing or mis-named library. . . or mail is not supported from that region. . .

d
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 Need help with ADABAS query (COBOL-AD... All Other Mainframe Topics 0
No new posts NAK is getting added FTP from Mainframes JCL & VSAM 6
No new posts SH256/MD5 Checksum in Mainframes JCL JCL & VSAM 14
No new posts RC query -Time column CA Products 3
No new posts Dynamically pass table name to a sele... DB2 2
Search our Forums:

Back to Top