I have a batch job that has 10 steps in STEP5. I have written an internal JCL and I want after Internal reader step are completed successfully my next step in the parent job which is STEP06 to execute. Could you please give any resolution to this problem.
-
When you refer to 'internal JCL' are you referring to executing a PROC? – Hogstrom Nov 27 '19 at 14:31
2 Answers
For what you have described, there are 2 approaches:
Break your process into 3 jobs - steps 1-5 as one job, the second job consisting of the JCL submitted in sep 5 and the third job consisting of step 6 (or steps 6-10 - you do not make it clear if the main JCL has 6 steps and the 'inner' JCL 4 steps, making the 10 steps you mention, or if the main JCL has 10 steps).
The execution of the 3 jobs will need to be serialised somehow.
Simply have the 'inner' JCL as a series of steps in the 'outer' JCL so that you only have once job with steps that run in order.

- 7,894
- 3
- 24
- 55
The typical approach to this sort of issue would be to use scheduler to handle the 3 part process as 3 jobs the middle one perhaps not submitted by the scheduler but monitored/tracked by it.
- With a good scheduler setup, there is a good chance that even if the jobs were run on different machines or even different types of machines that they could be tracked.
To have a single job delayed halfway through is possible but would require some sort of program to run in a loop (waiting so as not to use excessive cpu) checking for an event (a dataset being created or deleted, the job could itself could be checked or numerous other ways).
Another way could be to have part 1 submit a job to do part 2 and that job to then submit another as part 3.
Yet another way, perhaps frowned upon depedning upon it's importance, would be to have three jobs the first part submitted to run, the third part submitted but on hold. The first submits the second which releases the third.
Of course there is also the possibility that one job could do everthing as a single job.

- 51,415
- 16
- 49
- 68