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
 

 

Send mail from Mainframes - Query
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Send mail from Mainframes - Query
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: 2150
Location: At my coffee table

PostPosted: Fri Apr 04, 2008 4:33 pm    Post subject:
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    Post subject: Reply to: Send mail from Mainframes - Query
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: 2150
Location: At my coffee table

PostPosted: Fri Apr 04, 2008 6:18 pm    Post subject:
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    Post subject: Reply to: Send mail from Mainframes - Query
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: 2150
Location: At my coffee table

PostPosted: Fri Apr 04, 2008 6:45 pm    Post subject:
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    Post subject: Reply to: Send mail from Mainframes - Query
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: 2150
Location: At my coffee table

PostPosted: Fri Apr 04, 2008 7:13 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Sat Apr 05, 2008 5:42 am    Post subject: Reply to: Send mail from Mainframes - Query
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    Post subject: Reply to: Send mail from Mainframes - Query
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: 1288
Location: Chennai, India

PostPosted: Sat Apr 05, 2008 4:26 pm    Post subject: Reply to: Send mail from Mainframes - Query
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    Post subject: Reply to: Send mail from Mainframes - Query
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: 1288
Location: Chennai, India

PostPosted: Wed Apr 09, 2008 1:33 am    Post subject: Reply to: Send mail from Mainframes - Query
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    Post subject: Reply to: Send mail from Mainframes - Query
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: 1288
Location: Chennai, India

PostPosted: Thu Apr 10, 2008 2:25 pm    Post subject: Reply to: Send mail from Mainframes - Query
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    Post subject: Reply to: Send mail from Mainframes - Query
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

Site Director


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

PostPosted: Tue Apr 22, 2008 9:00 pm    Post subject:
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    Post subject: Reply to: Send mail from Mainframes - Query
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

Site Director


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

PostPosted: Wed Apr 23, 2008 11:20 pm    Post subject:
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    Post subject: Reply to: Send mail from Mainframes - Query
Reply with quote

Thanks Dick. I will do that.

Regards
Agni
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
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm
No new posts Two Selects in a single select query Rohit Umarjikar DB2 1 Fri Nov 04, 2016 8:46 pm
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts Reading data from PS file and send it... rajatbagga All Other Mainframe Topics 18 Fri Sep 23, 2016 12:51 pm
No new posts SQL Query optimization. arunsoods DB2 12 Sun Sep 04, 2016 6:27 am


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