MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Subject line in a mail sending a report using OUTPUT
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Thu Jul 15, 2004 1:01 pm    Post subject: Reply with quote

Manoj,

Here is a sample Job which will modify the contents of the SUBJECT line.we use a change command to change the bytes 10 thru 49. I assumed that input file has lrecl of 80 bytes and is of FB format.

Code:

//STEP0100 EXEC PGM=SORT                                             
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD *                                                     
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                                                           
DETAIL RECORD 0001                                                   
DETAIL RECORD 0002                                                   
DETAIL RECORD 0003                                                   
DETAIL RECORD 0004                                                   
DETAIL RECORD 0005                                                   
DETAIL RECORD 0006                                                   
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                     
  SORT FIELDS=COPY                                                   
  OUTREC FIELDS=(1,9,10:1,7,                                         
     CHANGE=(40,C'SUBJECT',C'REPORT HAS N ERROR RECORDS'),
     NOMATCH=(10,40),50,31)                               
/*


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
manojagrawal
Beginner


Joined: 25 Feb 2003
Posts: 124
Topics: 29

PostPosted: Thu Jul 15, 2004 1:07 pm    Post subject: Reply with quote

Oops. I got what you were saying now. Guess this wont help as the From, subject and body are not part of the report, but generated with the OUTPUT.

Thanks Kolusu and Cogito-Ergo-Sum for your help!
_________________
Thanks & Regards,
Manoj.
Back to top
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Thu Jul 15, 2004 1:11 pm    Post subject: Reply with quote

Kolusu,
Your solution does answer the question about modifyng the subject line contents, as asked by Manoj.

But, are you sure, it will actually modify correctly the subject line in the recepient's mail? Because, as Manoj said above,
Quote:
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 think, the SORTOUT contents will still go as the body of the mail inclusive of FROM, SUBJECT, etc. as you have hard-coded them in SORTIN. The Subject, IMO, will still remain the same in the recepient's mail.

BTW, you missed the OUTPUT parameter in SYSOUT for SORTOUT.
_________________
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
View user's profile Send private message
Cogito-Ergo-Sum
Advanced


Joined: 15 Dec 2002
Posts: 637
Topics: 43
Location: Bengaluru, INDIA

PostPosted: Thu Jul 15, 2004 1:13 pm    Post subject: Reply with quote

You are welcome, Manoj.
_________________
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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL) All times are GMT - 5 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group