I came to know that you are expert in ESP. I have one quesiton for you.
In one of our job, a Model DD step is used. In the proc, the step is normal like other steps, and in that step, we are copying a file to another file by using file aid utility. One of the file will be created monthly by a daily job.
The proc contains,
When ESP loads this job, it puts the model DD resolution step in this job. The dataset PQR.XYZ.Axxxxrr is created monthly by the job PQRAX which is a daily job. If the dataset PQR.XYZ.Axxxxrr is present then it should resolve the cycle code and replace xxxxrr with the cycle code, if its not present, then that line should be commented out.
The value for xxxxrr is resolved by the ESP. The dataset PQR.XYZ.Axxxxrr is created monthly by a daily job. I think by your solution, the job will pick the cycle code of that job, and hence it will again give JCL error for rest of the days.
#0 means, minimum 0 cycles and 1 means maximum 1 cycle. When this job is submitted, ESP puts a model DD resolution step, ESPPRMDD. This program will check for # and it resolves the cycle code accordingly.
My requirement is, the line should get commented all the days, except only when the dataset PQR.XYZ.A121006 (121006 is a cycle code just for an example) is catologed.
U can put a JCL step and check whether the PS is cataloged.
Give a JCL IF conition with the RC value as the condition and include or exclude the DD statement. I assume this should work. If not please correct me