On Wed, 9 Feb 2022 14:26:54 +0100, Radoslaw Skorupka <r.skoru...@hotmail.com> wrote:
>I need to schedule some job under TWS vel IWS vel ZWS. > >The job contain full month concatenation of daily datasets. >//INPUT DD DISP=SHR,DSN=HLQ.Y2022.D0101 >// DD DISP=SHR,DSN=HLQ.Y2022.D0102 >// DD DISP=SHR,DSN=HLQ.Y2022.D0103 >... >// DD DISP=SHR,DSN=HLQ.Y2022.D0131 > > >The problem is number of days in a month. >Sometimes it is 31, 30 or 28 (and 29) days. >I would comment out last DD using some variable. >Something like the following: >//*%OPC IF month =02 then MYVAR=** ELSE MYVAR='' >the DD: >//%MYVAR DD DISP=SHR,DSN=HLQ.Y2022.D0131 >will be commented or not. >It can be IF or CASE or anything. > >Or maybe there is other way to do that? > > I have a DFDSS backup job that uses this. Here you go. //P0DPDBKP JOB (DP,8715),'DAILY DP BACKUP',CLASS=P,MSGCLASS=Y //*%OPC SCAN //*********************************************************** //* CURRENT DESCRIPTION: * //* &CDAY CDAY=DAY WITHIN THE WEEK, 1=MONDAY * //* &CDD CDD=DAY WITHIN THE MONTH, 1=1ST OF MONTH * //* &CDDD CDDD=DAY WITHIN THE YEAR, 1=1ST DAY OF YEAR * //*********************************************************** //* TEST FOR DAILY //*%OPC BEGIN ACTION=INCLUDE,PHASE=SUBMIT, //*%OPC COMP=((&CDAY..NE.1),(&CDD..NE.01),(&CDDD..NE.001)) // EXEC DP#BKP,FREQ=DAILY //*%OPC END ACTION=INCLUDE //* TEST FOR WEEKLY //*%OPC BEGIN ACTION=INCLUDE,PHASE=SUBMIT, //*%OPC COMP=((&CDAY..EQ.1),(&CDD..NE.01),(&CDDD..NE.001)) // EXEC DP#BKP,FREQ=WEEKLY //*%OPC END ACTION=INCLUDE //* TEST FOR MONTHLY //*%OPC BEGIN ACTION=INCLUDE,PHASE=SUBMIT, //*%OPC COMP=((&CDD..EQ.01),(&CDDD..NE.001)) // EXEC DP#BKP,FREQ=MONTHLY //*%OPC END ACTION=INCLUDE //* TEST FOR YEARLY //*%OPC BEGIN ACTION=INCLUDE,PHASE=SUBMIT, //*%OPC COMP=(&CDDD..EQ.001) // EXEC DP#BKP,FREQ=YEARLY //*%OPC END ACTION=INCLUDE ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN