View previous topic :: View next topic |
Author |
Message |
manojagrawal Beginner

Joined: 25 Feb 2003 Posts: 124 Topics: 29
|
Posted: Wed Jul 14, 2004 10:46 pm Post subject: Subject line in a mail sending a report using OUTPUT |
|
|
Hello,
I am using the JCL OUTPUT=(*.DEST) to send a report to a mail id. This report is going as an attachment to the destination. I need to include a subject line in the mail that is sent like "Report has N error records".
Any idea's??? _________________ Thanks & Regards,
Manoj. |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Jul 15, 2004 4:29 am Post subject: |
|
|
How are you doing it currently? ICEGENER (or, any copy utility)? _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
superk Advanced

Joined: 19 Dec 2002 Posts: 684 Topics: 5
|
Posted: Thu Jul 15, 2004 7:19 am Post subject: |
|
|
Not much to go on. What are you coding for the "Subject:" parameter in your SMTP data? |
|
Back to top |
|
 |
manojagrawal Beginner

Joined: 25 Feb 2003 Posts: 124 Topics: 29
|
Posted: Thu Jul 15, 2004 9:15 am Post subject: |
|
|
Here is the JCL I am using. Its basically just running a PLI-SQL Module to create a report. The report goes to REPORT below.
Code: | //Job Header
//DEST1 OUTPUT DEST=NODE.MANOJ
//**************************************************************
//STEP010 EXEC PGM=IKJEFT01,
// REGION=2048K,
// DYNAMNBR=20,
// COND=(0,NE)
//SYSTSIN DD DSN=A.B.UTIL(SOMEUTIL),DISP=SHR
//SOMEDATA DD DSN=A.B.DATA(SOMEDATA),DISP=SHR
//SOMEDAT1 DD DSN=A.B.DATA(SOMEDAT1),DISP=SHR
//*
//FILE1 DD DSN=A.B.C(0),DISP=SHR
//FILE2 DD DSN=A.B.D(0),DISP=SHR
//FILE3 DD DSN=A.B.E(0),DISP=SHR
//SOMEDAT2 DD DSN=A.B.DATA(SOMEDAT2),DISP=SHR
//REPORT1 DD SYSOUT=*,
// DCB=(RECFM=FBA,LRECL=80,BLKSIZE=800),
// OUTPUT=(*.DEST1)
//PLIDUMP DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//* |
As I am using the OUTPUT Parameter, I get the report as an attachment to my mail id, i.e., Manoj@NODE. The mail I get has the following details
Quote: |
From: UserID running the job
Subject: File Jobname OUTPUT from UserID@SENDNODE
Body: The orginal file name was JobName OUTPUT with a time stamp of date/time
and the report as attachment. |
My question => Can I change the above Subject to something like "Report has N error records"??? Thanks!!! _________________ Thanks & Regards,
Manoj. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Jul 15, 2004 11:18 am Post subject: |
|
|
Manoj,
You can add a sort/file-aid step to change the subject line.First write the report to a temp dataset and in next step change the subject line to route the output to your destination
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
manojagrawal Beginner

Joined: 25 Feb 2003 Posts: 124 Topics: 29
|
Posted: Thu Jul 15, 2004 11:20 am Post subject: |
|
|
Kolusu,
I do not have file-aid. So would have to use Sort. Could you please give me some more details on how I would be able to do what you mentioned above. Thanks!! _________________ Thanks & Regards,
Manoj. |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Jul 15, 2004 11:32 am Post subject: |
|
|
Manoj,
You said, Quote: | The mail I get has the following details ... | .
That is, you are not formatting the Subject part? Does this happen automagically when you get the mail?
If you are formatting the Subject line, then your program itself should be modified accordingly to get the correct Subject line. Of course, SORT, FileAid, etc. will do. But, I guess, it will be an extra step. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
manojagrawal Beginner

Joined: 25 Feb 2003 Posts: 124 Topics: 29
|
Posted: Thu Jul 15, 2004 11:38 am Post subject: |
|
|
Cogito-Ergo-Sum,
No. I am not formatting the subject line. In fact, the entire subject line and body of the mail is put in automatically. The only part filled by me is the actual report, i.e., the attachment sent along. I guess the body and subject are a part of the OUTPUT statement result. I could not find any method of changing the subject or body.
I would like to try the sort method. How would I do that? _________________ Thanks & Regards,
Manoj. |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Jul 15, 2004 11:47 am Post subject: |
|
|
Hmm. Just as I suspected.
As you said, the subject is put in automatically, you will have to somehow override this automation.
Are you sure you are writing only actual report to REPORT1? After all ,there must be some means to provide the mail id to which the report is destined to. Tell us how you are acheiving this, and then maybe we can think of a means to put the subject line properly. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
manojagrawal Beginner

Joined: 25 Feb 2003 Posts: 124 Topics: 29
|
Posted: Thu Jul 15, 2004 12:02 pm Post subject: |
|
|
Cogito-Ergo-Sum,
The mail id is provided by the DEST Field. Below the Job header, you will find a line
Quote: |
//DEST1 OUTPUT DEST=NODE.MANOJ
|
When I create the output report REPORT1, I give the following.
Quote: |
//REPORT1 DD SYSOUT=*,
// DCB=(RECFM=FBA,LRECL=80,BLKSIZE=800),
// OUTPUT=(*.DEST1)
|
This results in the report REPORT1 going to job output as well as to the ID MANOJ@NODE, which is my email id.
The module run is only writing the report. _________________ Thanks & Regards,
Manoj. |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Jul 15, 2004 12:07 pm Post subject: |
|
|
Oh yes. The node value in DEST.
I am sorry Manoj. But, I do not know of a way to put in the subject name when a mail is sent this way. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
manojagrawal Beginner

Joined: 25 Feb 2003 Posts: 124 Topics: 29
|
Posted: Thu Jul 15, 2004 12:08 pm Post subject: |
|
|
What are the other ways? _________________ Thanks & Regards,
Manoj. |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Thu Jul 15, 2004 12:13 pm Post subject: |
|
|
Manoj,
Quote: |
In fact, the entire subject line and body of the mail is put in automatically.
|
Hmm I guessing that DEST1 is configured to send out the report with the hard-coded subject line. So talk to your systems people and ask them if you can override it.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Cogito-Ergo-Sum Advanced
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
|
Posted: Thu Jul 15, 2004 12:17 pm Post subject: |
|
|
I think, if you play around with SMTP data, or use some s/w such as IBM Inforprint , maybe SMTPNOTE too (not sure abt this), you will get to do this. Unfortunately, I do not have examples to post here. _________________ ALL opinions are welcome.
Debugging tip:
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth.
-- Sherlock Holmes. |
|
Back to top |
|
 |
manojagrawal Beginner

Joined: 25 Feb 2003 Posts: 124 Topics: 29
|
Posted: Thu Jul 15, 2004 12:45 pm Post subject: |
|
|
Kolusu,
Quote: |
You can add a sort/file-aid step to change the subject line.First write the report to a temp dataset and in next step change the subject line to route the output to your destination
|
How would I be able to add a sort step and send the temp file to the destination with the subject line? _________________ Thanks & Regards,
Manoj. |
|
Back to top |
|
 |
|
|