Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Thu Jul 15, 2004 1:01 pm Post subject:
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)
/*
Joined: 15 Dec 2002 Posts: 637 Topics: 43 Location: Bengaluru, INDIA
Posted: Thu Jul 15, 2004 1:11 pm Post subject:
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.
All times are GMT - 5 Hours Goto page Previous1, 2
Page 2 of 2
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