Juan, If you are comfortable submitting the job to INTRDR then the following DFSORT JCL will generate the dynamic JCL. verify the output from step0100 and if everything looks good then , change the following statement
//SORTOUT DD SYSOUT=* to //SORTOUT DD SYSOUT=(*,INTRDR),RECFM=FB This will submit the job to copy the contents to the member name with yesterday's date. //STEP0100 EXEC PGM=SORT //SYSOUT DD SYSOUT=* //SORTIN DD * //SORTOUT DD SYSOUT=* //SYSIN DD * OPTION COPY INREC OVERLAY=(DATE1-1) OUTFIL REMOVECC,NODETAIL,BUILD=(80X), HEADER1=('//MEMCRETE JOB (jobinfo),','''', 'PGMR NAME''',',',/, '// CLASS=A,',/, '// MSGCLASS=H,',/, '// MSGLEVEL=(1,1),',/, '// TIME=(,15),',/, '// NOTIFY=TSOID',/, '//*',/, '//COPYSTEP EXEC PGM=SORT',/, '//SYSOUT DD SYSOUT=*',/, '//SORTIN DD DISP=SHR,DSN=YOUR.INPUT.DSN TO BE COPIED',/, '//SYSIN DD *',/, ' OPTION COPY ',/, '//*'), TRAILER1=('//SORTOUT DD DISP=SHR,DSN=YOUR.OUTPUT.PDS(F',3,6,C')',/, '//*') //* Kolusu DFSORT Development IBM Corporation IBM Mainframe Discussion List <IBM-MAIN@listserv.ua.edu> wrote on 01/07/2014 06:09:37 AM: > From: Juan Mautalen <jgmauta...@yahoo.com.ar> > To: IBM-MAIN@listserv.ua.edu, > Date: 01/07/2014 06:09 AM > Subject: JCL and date variables > Sent by: IBM Mainframe Discussion List <IBM-MAIN@listserv.ua.edu> > > Hi: > > I have a question regarding JCL and date variables. I need to run a > job daily, whose output must be written to a partitionned dataset > with a member name referring to the day before job execution. > > Example: > If the job runs today, january 7 of 2014, it must create the > member F140106 ( and not F140107). That is because the job processes > information from the day before (and not from the day it is indeed running). > > Is there a way to achieve this purely from JCL? we have z/OS 1.13. > > Thanks in advance for your help, > > JUAN MAUTALEN > > ---------------------------------------------------------------------- > For IBM-MAIN subscribe / signoff / archive access instructions, > send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN