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

SAR to Email


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
kashi1234

New User


Joined: 11 Mar 2010
Posts: 16
Location: Chennai

PostPosted: Thu Mar 11, 2010 7:33 pm
Reply with quote

I have a program which sends SAR report to Email. It is sending to only one email at a time. I need to change that program so that I can send multiple SAR output to multiple users at a time. The below is the job that I'm using.

Code:

//STEPDEL EXEC PGM=IDCAMS
  DELETE $$TEST.@#OS904.S2B.SARBCH
  DELETE $$TEST.@#OS904.S2B.EMAIL
  DELETE $$TEST.@#OS904.S2B.REPORT
  DELETE $$TEST.@#OS904.S2B.ATTACH
//SYSPRINT DD SYSOUT=*
//*
// SET SAR=CSD         <-- VALID VALUES ARE USER OR CSD
//STEP100  EXEC PGM=QUIKJOB
//SYSUT1   DD  *
ID=@#OS9043
GEN=6015
SEQ=2
FROM EMAIL=KASHINATH.VENKATARAMANA
TO EMAIL=KASHINATH.VENKATARAMANA AND A.BASTIAN
//SYSUT2   DD  DSN=$$TEST.&SYSUID..S2B.SARBCH,DISP=(,CATLG,DELETE),
//             SPACE=(80,(10,5),RLSE),AVGREC=U,RECFM=FB,LRECL=80
//SYSUT3   DD  DSN=$$TEST.&SYSUID..S2B.EMAIL,DISP=(,CATLG,DELETE),
//             SPACE=(500,(30,10),RLSE),AVGREC=U,RECFM=FB,LRECL=500
//SYSIN    DD  DSN=@#OS904.SAR2BASE.QJOB1,DISP=SHR
//SYSIN    DD  DSN=@#OS904.SAR2BASE.QJOB1,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//SYSPRINT DD  SYSOUT=*
//*
//STEP110  EXEC PGM=SARBCH,PARM='FB.&SAR'
//REPORT   DD  DSN=$$TEST.&SYSUID..S2B.REPORT,
//             DISP=(,CATLG,DELETE),SPACE=(160,(20,10),RLSE),AVGREC=K
//SYSIN    DD  DSN=$$TEST.&SYSUID..S2B.SARBCH,DISP=SHR
//SYSPRINT DD  SYSOUT=*
//ABEND110 EXEC PGM=ABEND,COND=(0,EQ,STEP110)
//*
//STEP120  EXEC PGM=QUIKJOB
//SYSUT1   DD  DSN=$$TEST.&SYSUID..S2B.REPORT,DISP=OLD
//SYSUT2   DD  DSN=$$TEST.&SYSUID..S2B.ATTACH,DISP=(,CATLG,DELETE),
//             SPACE=(500,(50,25),RLSE),AVGREC=K,RECFM=FB,LRECL=500
//SYSIN    DD  DSN=@#OS904.SAR2BASE.QJOB2,DISP=SHR
//SYSOUT   DD  SYSOUT=*
//SYSOUT   DD  SYSOUT=*
//SYSPRINT DD  SYSOUT=*
//ABEND120 EXEC PGM=ABEND,COND=(0,EQ,STEP120)
//*
//STEP130  EXEC PGM=IEBGENER
//SYSUT1   DD  DSN=$$TEST.&SYSUID..S2B.EMAIL,DISP=OLD
//         DD  DSN=$$TEST.&SYSUID..S2B.ATTACH,DISP=OLD
//SYSUT2   DD  SYSOUT=(B,SMTP)
//SYSPRINT DD  SYSOUT=*
//SYSIN    DD  DUMMY
//ABEND130 EXEC PGM=ABEND,COND=(0,EQ,STEP130)
//*
//STEP900  EXEC PGM=IEFBR14
//DD01     DD  DSN=$$TEST.&SYSUID..S2B.SARBCH,DISP=OLD
//*
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Mar 11, 2010 7:46 pm
Reply with quote

OK, but what is the question or issue? Is your post representing a problem with using SAR (which you'll have to refer to the product documentation for) or is it a problem with using your email system (something that's more or less site specific)?
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: Thu Mar 11, 2010 7:48 pm
Reply with quote

Google is your friend. Googling rfc 2822 will give you the SMTP message format, and you will discover that each email address must have its own TO line in the email. I don't use SAR so I cannot address your other issue.
Back to top
View user's profile Send private message
kashi1234

New User


Joined: 11 Mar 2010
Posts: 16
Location: Chennai

PostPosted: Thu Mar 11, 2010 8:10 pm
Reply with quote

The below line is send mail to the first ID not the second. That is my problem

TO EMAIL=KASHINATH.VENKATARAMANA AND A.BASTIAN
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: Thu Mar 11, 2010 8:20 pm
Reply with quote

Code:
TO EMAIL=KASHINATH.VENKATARAMANA
TO EMAIL=A.BASTIAN
is so hard to do?
Back to top
View user's profile Send private message
kashi1234

New User


Joined: 11 Mar 2010
Posts: 16
Location: Chennai

PostPosted: Thu Mar 11, 2010 8:22 pm
Reply with quote

I tried that it did not work. It is sendign only to one mail id
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: Thu Mar 11, 2010 8:51 pm
Reply with quote

In that case, you need to get with your site support group and get your questions answered from them. The "TO EMAIL=" is not standard SMTP format, so there are site-specifics that you need to be aware of and use. Only your site support group can assist you with things that are specific to your site.
Back to top
View user's profile Send private message
kashi1234

New User


Joined: 11 Mar 2010
Posts: 16
Location: Chennai

PostPosted: Thu Mar 11, 2010 8:54 pm
Reply with quote

Thank you very much for your time. I appreciate it.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Mar 12, 2010 1:50 am
Reply with quote

Logically, from a business perspective, you'd think that it would make more sense to set up an email distribution group (something that could be managed by another team) so that the job would only ever have to send one message to that one distribution group.
Back to top
View user's profile Send private message
kashi1234

New User


Joined: 11 Mar 2010
Posts: 16
Location: Chennai

PostPosted: Fri Mar 12, 2010 2:02 am
Reply with quote

That will be a good idea, but that doesn't work effectively as the mail address will be changing. I have no other choice expect including another id. The person who creaed this program has mentioned that it can be used for multiple TO email ids but not sure how as i am technically challenged.

Thanks,
Kashinath
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: Fri Mar 12, 2010 2:24 am
Reply with quote

Hello,

Quote:
but that doesn't work effectively as the mail address will be changing.
This is the whole reason to implement a distribution group. . .

The group e-addr never changes. As recipients are added, changed, or removed the group definition is modified. There would be no need to change the job that sends the e-mail just because some addressee information had changed.

This would all be done external to the mainframe process.
Back to top
View user's profile Send private message
kashi1234

New User


Joined: 11 Mar 2010
Posts: 16
Location: Chennai

PostPosted: Fri Mar 12, 2010 2:30 am
Reply with quote

Thats true but i want the recipients to be changed every time. If I add a distribution list i wont be able to change the recipients.

Thanks,
Kashinath
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: Fri Mar 12, 2010 2:54 am
Reply with quote

Hello,

Quote:
Thats true but i want the recipients to be changed every time.
Hopefully, this is NOT what you want. I would hope that you want this to run every time with no interventoin on your part. , ,

If you are a developer, you should not be the one changing the recipient list.
Back to top
View user's profile Send private message
kashi1234

New User


Joined: 11 Mar 2010
Posts: 16
Location: Chennai

PostPosted: Fri Mar 12, 2010 3:13 am
Reply with quote

I am not a developer. I will be running that program. My requirement is very simple. I have a team of 10 people using this program. I need SAR report need to sent to their own ID and another common ID(Two email id user defined).


Thanks for your support,
Kashinath
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Fri Mar 12, 2010 3:48 am
Reply with quote

Maybe, and only maybe, if you could show us what the contents of the input mail message dataset '$$TEST.&SYSUID..S2B.EMAIL' looks like, someone might have a suggestion, although I suspect that you'll have to make some changes to your Quikjob program to get the correct results.
Back to top
View user's profile Send private message
kashi1234

New User


Joined: 11 Mar 2010
Posts: 16
Location: Chennai

PostPosted: Fri Mar 12, 2010 8:53 pm
Reply with quote

the below is what i see when i see $$TEST.&SYSUID..S2B.EMAIL'

helo searshc.com
MAIL FROM: <KASHINATH.VENKATARAMANA@searshc.com>
RCPT TO: <KASHINATH.VENKATARAMANA@searshc.com>
DATA
FROM: <KASHINATH.VENKATARAMANA@searshc.com>
TO: <KASHINATH.VENKATARAMANA@searshc.com>
SUBJECT: SAR report @#OS9043
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="simpleboundary"

--simpleboundary
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

Attached is SAR report @#OS9043.

--simpleboundary
Content-Type: text/plain; charset="us-ascii"; name="@#OS9043.txt"
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts REXX to send an email in Mainframe wi... CLIST & REXX 3
No new posts REXX to send an email in Mainframe CLIST & REXX 4
No new posts Problem while sending special charact... JCL & VSAM 4
No new posts TXT2PDF and then SMTP email a PDF JCL & VSAM 4
No new posts Send email without SMTP All Other Mainframe Topics 5
Search our Forums:

Back to Top