Good day to all DFSORT gurus
Background: I have setup an automated e-mail reporting system which grab
reports from various inputs, then I use IEBGENER to build up one PS file
containing data in this sequence: e-mail body - report - boundary data - next
report - ... etc ...
(In this way I can send out e-mails to my clients where each e-mail is
containing anything from 1 to 10 attachments.)
That PS file is then send over to SMTP to go out. Those boundary lines are used
to define various attachments containing reports for outgoing e-mails.
Now, a client asked whether it is possible to insert run date in the file names
of those attachments for easy retrieval at a later stage.
What I want to do is to dynamically replace a specific string into date of run
in the filenames of the attachment in the e-mail.
So, for example I have this FILENAME="Never Used Ids - YYYYMMDD.TXT"
I wish to replace above line with today's date using ICETOOL FINDREP or a
similar command.
So that example line should be changed to this for today: FILENAME="Never Used
Ids - 2016-09-13.TXT"
I have tried out this JCL to scan whole input and replace the YYYYMMDD to
rundate, but ICETOOL just shouts RC=16 saying invalid syntax found:
//SELECT EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//PRINT DD SYSOUT=*
//INVOER DD *
.... e-mail subject and body
--1234567890
CONTENT-TYPE: TEXT/PLAIN; CHARSET=US-ASCII; NAME="Never Used ids - YYYYMMDD.TXT"
CONTENT-DISPOSITION: ATTACHMENT; FILENAME="Never Used ids - YYYYMMDD.TXT"
..... report ...
--1234567890
CONTENT-TYPE: TEXT/PLAIN; CHARSET=US-ASCII; NAME="Revoked ids - YYYYMMDD.TXT"
CONTENT-DISPOSITION: ATTACHMENT; FILENAME="Revoked ids - YYYYMMDD.TXT"
..... report ....
//TOOLIN DD *
COPY FROM(INVOER) TO(PRINT) USING(SORT)
//SORTCNTL DD *
OPTION COPY
OUTREC FINDREP=(IN=C'YYYYMMDD',OUT=DATE1(-))
As you can see those YYYYMMDD can be on any place in the input lines.
I only want to change those boundary lines, nothing else. Otherwise I have to
use some editing tools on the datasets containing the original boundary lines.
Any clues please? Are any other free products available which can do that
tricks?
Many thanks in advance.
Groete / Greetings
Elardus Engelbrecht
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN