Page 1 of 1

How many JOB statements are allowed in a single JCL?

Posted: Sat Aug 06, 2016 9:43 pm
by Shahid
Hi,

This question might be very trivial but it has haunted me badly. How many JOB statements are allowed in a single JCL? I have searched on google and there are mix of answers like,
  • we can have 15 Job cards.
    There is no limit.
    It depends on system settings.
    It depends on what is the value edited by system programmer in TIOT.
I have experimented with 2, 3, 5, 10, 15, 20 and more Job statements and there was no error. I thought go mad and make 1000+ Job statement but my frined said it might hang the mainframe and I did not try it.

Can someone please answer, how many JOB statements are allowed in a single JCL?

Re: How many JOB statements are allowed in a single JCL?

Posted: Sat Aug 06, 2016 9:58 pm
by enrico-sorichetti
Can someone please answer, how many JOB statements are allowed in a single JCL?
define what You mean by single JCL

anyway a dataset/member can contain as many JOBs as You want (no limit ) !

on the other side there are limits on the number of steps for a JOB and on the number of DDs allowed for a step

Re: How many JOB statements are allowed in a single JCL?

Posted: Sat Aug 06, 2016 11:10 pm
by Robert Sample
It depends on what is the value edited by system programmer in TIOT.
No, it does not. The TIOT determines the number of DD statements a single step may have but has nothing to do with the number of JOB statements you may store in a data set (assuming that is what you mean by "single JCL").
I thought go mad and make 1000+ Job statement but my frined said it might hang the mainframe and I did not try it.
Ask your "frined" (sic) what was meant by "hang the mainframe" as I have no idea. If you put 1000+ job statements in a single data set and submit the data set, the jobs will be submitted. It may take them a while to get into the system, depending upon your site's JES set up, and it certainly could take a long time for them to execute (again depending upon your site's JES set up and which job class(es) are used and the JES set up for the job class(es), but they won't "hang the mainframe".

One of the products I install comes as a single data set with over 1 MILLION lines in it. The installation process starts by customizing the job statement and then submitting the job to create the load library and partitioned data sets.

Re: How many JOB statements are allowed in a single JCL?

Posted: Sun Aug 07, 2016 12:25 pm
by Anuj Dhawan
Shahid wrote: I thought go mad and make 1000+ Job statement but my frined said it might hang the mainframe and I did not try it.
Would like to have a calm conversation with your 'frined'(sic)! :lol:

Think about the sales happening using plastic-cards on Black Friday, Christmas or on new year - with the theory stated above, these sales could never be a real phenomenon; but you also know that they exist in real and happen every year, don't you? Needless to mention, mainframe is heavily used by banking institutions (plastic card providers).

Re: How many JOB statements are allowed in a single JCL?

Posted: Mon Aug 08, 2016 1:45 pm
by Shahid
enrico-sorichetti wrote:
Can someone please answer, how many JOB statements are allowed in a single JCL?
define what You mean by single JCL

anyway a dataset/member can contain as many JOBs as You want (no limit ) !

on the other side there are limits on the number of steps for a JOB and on the number of DDs allowed for a step
By single JCL - I meant a member of a PDS having a single step and JOB card. What I meant what if we add many more JOB cards, up to what limit can we add them?

Re: How many JOB statements are allowed in a single JCL?

Posted: Mon Aug 08, 2016 1:49 pm
by Shahid
Robert Sample wrote:
It depends on what is the value edited by system programmer in TIOT.
No, it does not. The TIOT determines the number of DD statements a single step may have but has nothing to do with the number of JOB statements you may store in a data set (assuming that is what you mean by "single JCL").
I thought go mad and make 1000+ Job statement but my frined said it might hang the mainframe and I did not try it.
Ask your "frined" (sic) what was meant by "hang the mainframe" as I have no idea. If you put 1000+ job statements in a single data set and submit the data set, the jobs will be submitted. It may take them a while to get into the system, depending upon your site's JES set up, and it certainly could take a long time for them to execute (again depending upon your site's JES set up and which job class(es) are used and the JES set up for the job class(es), but they won't "hang the mainframe".

One of the products I install comes as a single data set with over 1 MILLION lines in it. The installation process starts by customizing the job statement and then submitting the job to create the load library and partitioned data sets.
Thanks for your answer. I didnot know about TIOT and it was confusing as some online answers have used this.

So as many JOB statements I shall have those many jobs will not get submitted all once? They get submitted one by one?
One of the products I install comes as a single data set with over 1 MILLION lines in it.
But they might be code lines, were they JOB statements?

Sorry, if I am look like stupid but I am trying to understand this.

Re: How many JOB statements are allowed in a single JCL?

Posted: Mon Aug 08, 2016 3:43 pm
by Robert Sample
JCL is submitted line by line. A single data set with multiple JOB statements is still read into JES line by line.

The million line data set had ONE JOB statement; I was pointing out that really large data sets can still be submitted.

[ Post made via iPhone ] Image

Re: How many JOB statements are allowed in a single JCL?

Posted: Mon Aug 08, 2016 6:17 pm
by Robert Sample
So as many JOB statements I shall have those many jobs will not get submitted all once? They get submitted one by one?
Jobs are not all submitted at one time -- the system will read the data set and each time a JOB statement is found a new job will be submitted to JES. This does not happen in parallel. Although, thinking about your question this morning I realized that there is a hard limit that applies. When your site sets up JES (either JES2 or JES3 -- which doesn't matter), one of the configuration parameters is the number of jobs that can exist in the system. Once you hit that maximum (for JES2 under z/OS 2.2, it is 999999 but the default is 9999), no more jobs can be submitted into the system. Since it is a site-specific parameter, your site may have a different value and your site support group would have to tell you what the limit is.

Re: How many JOB statements are allowed in a single JCL?

Posted: Thu Aug 11, 2016 12:29 pm
by Shahid
Anuj Dhawan wrote:
Shahid wrote: I thought go mad and make 1000+ Job statement but my frined said it might hang the mainframe and I did not try it.
Would like to have a calm conversation with your 'frined'(sic)! :lol:

Think about the sales happening using plastic-cards on Black Friday, Christmas or on new year - with the theory stated above, these sales could never be a real phenomenon; but you also know that they exist in real and happen every year, don't you? Needless to mention, mainframe is heavily used by banking institutions (plastic card providers).
Thanks ANuj. Yes, there must be so many jobs running on those days?

Re: How many JOB statements are allowed in a single JCL?

Posted: Thu Aug 11, 2016 12:31 pm
by Shahid
Robert Sample wrote: JCL is submitted line by line. A single data set with multiple JOB statements is still read into JES line by line.

The million line data set had ONE JOB statement; I was pointing out that really large data sets can still be submitted.

[ Post made via iPhone ] Image
Thanks Robert. It helps to undersantd.

Re: How many JOB statements are allowed in a single JCL?

Posted: Thu Aug 11, 2016 12:35 pm
by Shahid
Robert Sample wrote:
So as many JOB statements I shall have those many jobs will not get submitted all once? They get submitted one by one?
Jobs are not all submitted at one time -- the system will read the data set and each time a JOB statement is found a new job will be submitted to JES. This does not happen in parallel. Although, thinking about your question this morning I realized that there is a hard limit that applies. When your site sets up JES (either JES2 or JES3 -- which doesn't matter), one of the configuration parameters is the number of jobs that can exist in the system. Once you hit that maximum (for JES2 under z/OS 2.2, it is 999999 but the default is 9999), no more jobs can be submitted into the system. Since it is a site-specific parameter, your site may have a different value and your site support group would have to tell you what the limit is.
Thanks Robert for your effort in answer. So even if we put all the jobs in some system in a single member and submit that member, all the jobs will get submitted one by one! So if in a batch-cycle, we have, assume, 1000 jobs and we put all those jobs in a single dataset and submit, they wil also get submitted. Then is it like a smal sechduler in itself?

Re: How many JOB statements are allowed in a single JCL?

Posted: Thu Aug 11, 2016 3:16 pm
by enrico-sorichetti
So if in a batch-cycle, we have, assume, 1000 jobs and we put all those jobs in a single dataset and submit, they wil also get submitted.
YES
Then is it like a smal sechduler in itself?
NOPE!

each job will be treated independently from the other ones
the execution sequence will be UNPREDICTABLE
and it will depend roughly on the number of converter task

a big job ( many EXECs many DDs ) will take longer to interpret/convert that a single exec single dd job
complicated by procs and nested procs

submitting a dataset with

Code: Select all

//verylarge JOB ..
// ... 
// ...
// ...
//onestep JOB 
//STEP EXEC PGM=IEFBR14
//DDNM DD ....
will normally result in the onestep job executed first

Re: How many JOB statements are allowed in a single JCL?

Posted: Thu Aug 11, 2016 6:15 pm
by Robert Sample
The jobs will be submitted sequentially. They may or may not have sequential JES numbers (depending upon if any other jobs are being submitted to the system). The order of execution, however, as enrico pointed out, if unpredictable.