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

Sending Email from Mainframe


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

New User


Joined: 17 Oct 2008
Posts: 8
Location: Noida

PostPosted: Wed Oct 22, 2008 10:58 am
Reply with quote

Hi

I need to send a Report to multiple Suppliers from Mainframe with different subject for each supplier using single JCL.

I know the syntax of sending the mail to multiple supplier with same subject.

Prabhjot Singh
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Wed Oct 22, 2008 11:37 am
Reply with quote

afaik, you'll have to send a different email for every different subject.
Back to top
View user's profile Send private message
Prabh_Xansa

New User


Joined: 17 Oct 2008
Posts: 8
Location: Noida

PostPosted: Wed Oct 22, 2008 12:01 pm
Reply with quote

Hi

But In Case I need to Send Email to 1000 Supplier. Is there any alternative way.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Wed Oct 22, 2008 12:22 pm
Reply with quote

whoever You are sending emails ( supplier or clients ) it does not make any difference

if something in the email text/subject is different
than the thing is unique so you do not have alternatives

the only thing You can look after is how to generate them programmatically
in order to save some jcl/data handling
Back to top
View user's profile Send private message
Prabh_Xansa

New User


Joined: 17 Oct 2008
Posts: 8
Location: Noida

PostPosted: Wed Oct 22, 2008 3:26 pm
Reply with quote

How we programically do the same task. Any hint
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Oct 22, 2008 4:49 pm
Reply with quote

Use a programming language to generate each email with the addressee and subject line you want and ship them off to your SMTP process.
Back to top
View user's profile Send private message
Prabh_Xansa

New User


Joined: 17 Oct 2008
Posts: 8
Location: Noida

PostPosted: Wed Oct 22, 2008 4:58 pm
Reply with quote

Hi Rob

In that case i need to create as many different dataset for each addresse & subject Or i will dynamically submit the task for each addresse one bye one..

Can you please provide some example code for the same.

With Regards
Prabhjot
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Oct 22, 2008 5:10 pm
Reply with quote

Actually, you can use just one data stream and put all the data into it. Follow the usual syntax ... each HELO through the trailing period is treated by SMTP as a separate email and processed separately.

You might want to discuss this with your systems support people first. We have an application blasting 3,000 emails through SMTP once a month. We set up a different SMTP for the application to use since the 3,000 emails slowed down all the other applications sending email by several hours (SMTP is not a speedy process).
Back to top
View user's profile Send private message
Prabh_Xansa

New User


Joined: 17 Oct 2008
Posts: 8
Location: Noida

PostPosted: Thu Oct 23, 2008 10:13 am
Reply with quote

Thanx alot...I think i got they way now....
Back to top
View user's profile Send private message
rakesha.hg

Active User


Joined: 21 Mar 2008
Posts: 161
Location: bangalore

PostPosted: Fri Oct 24, 2008 11:35 am
Reply with quote

hi,

Can you please tell th forum ... the way your approaching icon_question.gif

i've a similar requirement(am new to this email stuff icon_redface.gif ..)

i'm reasearching for this requirement!
Back to top
View user's profile Send private message
Prabh_Xansa

New User


Joined: 17 Oct 2008
Posts: 8
Location: Noida

PostPosted: Fri Oct 24, 2008 11:49 am
Reply with quote

For sending Email to Multiple people with different matter. You need to programically handle this.

Generally for sending Email to Single user, your mail header part consist of following matter

HELO
MAIL FROM: <VALID EMAILID >
RCPT TO: <VALID EMAILID>
DATA
FROM: COMPANY ABC
TO: <VALID EMAILID>
SUBJECT: PROBLEM IN STORE NUMBER ..
MAIN MATTER
.

In case you need to send mail to multiple users, you have to generate the above matter dynamically in program again & again with different details.

HELO
MAIL FROM: <VALID EMAILID >
RCPT TO: <VALID EMAILID>
DATA
FROM: COMPANY ABC
TO: <VALID EMAILID>
SUBJECT: PROBLEM IN STORE NUMBER ..
MAIN MATTER
.
HELO
MAIL FROM: <VALID EMAILID >
RCPT TO: <VALID EMAILID>
DATA
FROM: COMPANY ABC
TO: <VALID EMAILID>
SUBJECT: PROBLEM IN STORE NUMBER ..
MAIN MATTER
.

.....

Then Include this dataset in the PROC/JCL containing STMP protocol as HEADER Data Set.

//COPY1 EXEC PGM=ICEGENER
//SYSUT1 DD DSN=HEADER DATA SET,DISP=SHR
// DD DSN=TRAILER DATA SET,DISP=SHR
//SYSUT2 DD SYSOUT=(B,SMTP)
//SYSIN DD DUMMY
//SYSPRINT DD SYSOUT=*
//*
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Oct 24, 2008 4:54 pm
Reply with quote

The SYSOUT=(B,SMTP) will depend upon the JES specifications for your site. Class B is not always the class to use -- we use 9, for example. And the name of the SMTP address space must be the second parameter.
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 FTP VB File from Mainframe retaining ... JCL & VSAM 4
No new posts Mainframe openings in Techmahnidra fo... Mainframe Jobs 0
No new posts Mainframe Programmer with CICS Skill... Mainframe Jobs 0
No new posts How to Reformat a file using File Man... All Other Mainframe Topics 14
No new posts NDM getting stuck - mainframe/JCL All Other Mainframe Topics 13
Search our Forums:

Back to Top