The Requirement is as below : I need to send a mail to a list of email ids with the following message : "Todays batch run for processing date dd/mm/yyyy is now completed."
The (dd/mm/yyyy) is a dynamic date coming from the system in a pds member aaaa.bbbbb.cccc(pdates)
The PDS member pdates contains the following set variables :
CIF01 SET CIF01='06/09/13'
CIF02 SET CIF02='01/04/13'
VTS01 SET VTS01='09.09.2013'
VTS02 SET VTS02='09/09/2013'
ZRU01 SET ZRU01='06/09/2013'
ZRU02 SET ZRU02='09/09/2013'
ZDS01 SET ZDS01='06/09/2013'
ZDS02 SET ZDS02='07/09/2013'
WGS01 SET WGS01='09/09/2013'
WOS01 SET WOS01='06/09/2013'
QZS01 SET QZS01='09/09/2013'
IKU04 SET IKU04='09/09/2013'
IKU03 SET IKU03='06/09/2013'
IKU02 SET IKU02='06.09.2013'
IKU01 SET IKU01='11.09.2013'
WOS02 SET WOS02='+0000'
The PDATES member gets updated regularly on any batch run date and will contain the processing dates in any one of the set variables.
Approach 1:
I tried to include the PDATES member in the JCL. Works fine. But when I try to set the value of the variable...for example say CIF01 in the subject line with the code &CIF01 (The way we use set variables) it does not work.the mail simply gets sent as : Todays batch run for processing date &CIF01 is now completed.
Approach 2:
I created the body of the EMAIL with the text "Todays batch run for processing date dd/mm/yyyy is now completed" and tried using the SORT OVERLAY and tried passing the CIF01 value to it dynamically....but its not working.
Example is as below :
// SET REPL=06092013
//SORTSTP2 EXEC PGM=SORT,PARM='DYNALLOC'
//SYSOUT DD SYSOUT=*
//SYMNAMES DD *
DYNAM1,'&REPL'
//SORTIN DD DSN=XZSEWT.INPUT.FILE,DISP=SHR
//SORTOUT DD DSN=XZSEWT.INPUT.FILE.D060913,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(100,(100,100),RLSE)
//SYSIN DD *
INREC IFTHEN=(WHEN=(27,5,CH,EQ,C'RAJEEV'),OVERLAY=(35:C'&REPL'))
SORT FIELDS=COPY
OUTREC FIELDS=(1,80)
//SORTSTP2 EXEC PGM=SORT,PARM='DYNALLOC'
//SYSOUT DD SYSOUT=*
//SYMNAMES DD *
DYNAM1,'&REPL'
//SORTIN DD DSN=XZSEWT.INPUT.FILE,DISP=SHR
//SORTOUT DD DSN=XZSEWT.INPUT.FILE.D060913,
// DISP=(,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(100,(100,100),RLSE)
//SYSIN DD *
INREC IFTHEN=(WHEN=(27,5,CH,EQ,C'RAJEEV'),OVERLAY=(35:C'&REPL'))
SORT FIELDS=COPY
OUTREC FIELDS=(1,80)
Is there a way to pass a value to a sort card dynamically using a jcl....I tried using SYMNAMES...but its not working....The aim is to assign the date dynamically in the mail from the PDATES member file.
Could you please advise. Thank you.