Running 3 JCL is much more faster than one JCL with three steps
I´ve got funny problem and no explanation/solution:
I run a JCL with three steps: sort a file, unload a table, run program. run time is really high (just a few seconds CPU time and more than half an hour).
If I divide the three steps into three single jcl and submit jcl, every jcl just need a few seconds. So running three jcl is much more faster than one jcl with three steps.
what can be a reason? Do I have to set some special parameters for scheduling, to get good run time in both cases?
Re: Running 3 JCL is much more faster than one JCL with three steps
Any single JCL job runs its' programs sequentially. If you're familiar with the lower platforms, it's like running a script. No line can run until the previous line has completed.
Only in this case, no program can run until the previous one has completed.
When you submit 3 jobs, each gets a different initiator and run simultaneously. In fact, the ability to run many, many jobs simultaneously is the hallmark of a mainframe.
On a lower platform, this is similar to forking several processes.
I think if you add up all the time from the 3 separate jobs, you will have slightly higher runtimes and resource usage (wall clock, SRB, EXCP & CPU) than with a single job.
I'm not sure I understand your question regarding scheduling. If the first step creates a dataset that the second step uses and the second then creates a dataset used in the third, you have no other recourse than to single-thread these jobs.
If the three steps have nothing to do with one another, then submitting them separately is a good idea.
In theory, you could use BDT and batch pipes, but based on your question, I’d say you need to gain some more experience before working with those.
kk