View previous topic :: View next topic
|
Author |
Message |
kashi1234
New User
Joined: 11 Mar 2010 Posts: 16 Location: Chennai
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
kashi1234
New User
Joined: 11 Mar 2010 Posts: 16 Location: Chennai
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Code: |
TO EMAIL=KASHINATH.VENKATARAMANA
TO EMAIL=A.BASTIAN |
is so hard to do? |
|
Back to top |
|
|
kashi1234
New User
Joined: 11 Mar 2010 Posts: 16 Location: Chennai
|
|
|
|
I tried that it did not work. It is sendign only to one mail id |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
kashi1234
New User
Joined: 11 Mar 2010 Posts: 16 Location: Chennai
|
|
|
|
Thank you very much for your time. I appreciate it. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
kashi1234
New User
Joined: 11 Mar 2010 Posts: 16 Location: Chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
kashi1234
New User
Joined: 11 Mar 2010 Posts: 16 Location: Chennai
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
kashi1234
New User
Joined: 11 Mar 2010 Posts: 16 Location: Chennai
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
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 |
|
|
kashi1234
New User
Joined: 11 Mar 2010 Posts: 16 Location: Chennai
|
|
|
|
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 |
|
|
|