How many JOB statements are allowed in a single JCL?

JES2/3, JCL, utilities.
Post Reply
Shahid
Registered Member
Posts: 47
Joined: Sun Aug 25, 2013 1:00 am

How many JOB statements are allowed in a single JCL?

Post 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?
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 825
Joined: Wed Sep 11, 2013 3:57 pm

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

Post 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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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.
User avatar
Anuj Dhawan
Founder
Posts: 2799
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Contact:
India

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

Post 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).
Thanks,
Anuj

Disclaimer: My comments on this website are my own and do not represent the opinions or suggestions of any other person or business entity, in any way.
Shahid
Registered Member
Posts: 47
Joined: Sun Aug 25, 2013 1:00 am

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

Post 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?
Shahid
Registered Member
Posts: 47
Joined: Sun Aug 25, 2013 1:00 am

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

Post 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.
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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.
Shahid
Registered Member
Posts: 47
Joined: Sun Aug 25, 2013 1:00 am

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

Post 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?
Shahid
Registered Member
Posts: 47
Joined: Sun Aug 25, 2013 1:00 am

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

Post 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.
Shahid
Registered Member
Posts: 47
Joined: Sun Aug 25, 2013 1:00 am

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

Post 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?
enrico-sorichetti
Global Moderator
Global Moderator
Posts: 825
Joined: Wed Sep 11, 2013 3:57 pm

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

Post 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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort 8-)
User avatar
Robert Sample
Global Moderator
Global Moderator
Posts: 1886
Joined: Fri Jun 28, 2013 1:22 am
Location: Dubuque Iowa
United States of America

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

Post 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.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “JCL - Job Control Language.”