I am trying to create JCL which will send an email with an attachment. This JCL currently works and emails report to me but when run every day will clobber the previous day report. I want the atatchment name to contain a date - how do I do this?
This is my JCL so far:
//TRANSMIT EXEC PGM=IKJEFT01,DYNAMNBR=25,REGION=1280K,TIME=1
//SYSTSPRT DD SYSOUT=*
//TRANSMIT DD *
Date: (generated by system)
Subject: Extract Report
Content-type: MULTIPART/MIXED; BOUNDARY=StartOfNextPart
Content-type: text/plain: charset=us-ascii
The Extract Reports are attached.
Double-click, and click on Launch button, to view in Notepad.
Content-type: text/plain: charset=us-ascii; name=extract.txt
Content-disposition: attachment; filename=extract.txt
// DD DSN=DEV.EXTR.REPORT.DAILY,DISP=SHR
// DD *
NOTE : This email is machine-generated. DO NOT REPLY.
//SYSTSIN DD *
TRANSMIT PR.SMTP DDNAME(TRANSMIT) NOEPILOG NOLOG NOPROLOG