I have a jcl job need to be run in every month, for each month I need to manually rewrite the code and add a new month data.
//M20171 DD DSN=A000000.MONTHDT.MONTH1,DISP=SHR
//M20172 DD DSN=A000000.MONTHDT.MONTH2,DISP=SHR
//M20173 DD DSN=A000000.MONTHDT.MONTH3,DISP=SHR
//M20174 DD DSN=A000000.MONTHDT.MONTH4,DISP=SHR
//M20175 DD DSN=A000000.MONTHDT.MONTH5,DISP=SHR
.
.
For example at May 2017, I need to add a new data //M20175,
and for 2017 Jun, I will have to add another new data //M20176, so and so forth.
May I ask is that possible and how I can make it more automatic, use some loop methods or any way to make this easy?
Thank you.