I have a backup job which I run to take current copy of the file and save it with today’s date. For months I’ve been editing it to change today’s date. 10 minutes of browsing the internet showed me how easy it was!
//MYLIBS1 JCLLIB ORDER=USER.Z24C.PROCLIB // SET TODAY=D&YYMMDD //S1 EXEC PROC=BACKUP,P=USER.Z24C.PARMLIB,DD=&TODAY.
The procedure has
//BACKUP PROC P='USER.Z24C.PROCLIB',DD='UNKNOWN'
//S1 EXEC PGM=IKJEFT01,REGION=0M,
// PARM='XMIT A.A DSN(''&P'') OUTDSN(''BACKUP.&DD..&P'')'
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
which gave me
IEFC653I SUBSTITUTION JCL – PGM=IKJEFT01,REGION=0M,PARM=’XMIT A.A DSN(”USER.Z24C.PARMLIB”) OUTDSN(”BACKUP.D210906.USER.Z24C.PARMLIB”)’
I could have used (see here for a complete list)
- &LYYMMDD for local date
- &HHMMSS for time
- &LHHMMSS for local time
Easy – I should have done this years ago!