How many JOB statements are allowed in a single JCL?

JES2/3, JCL, utilities.

Topic author
Shahid
Registered Member
Posts: 40
Joined: Sun Aug 25, 2013 1:00 am
Has thanked: 12 times

How many JOB statements are allowed in a single JCL?

Postby Shahid » Sat Aug 06, 2016 9:43 pm

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: 822
Joined: Wed Sep 11, 2013 3:57 pm
Been thanked: 69 times

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

Postby enrico-sorichetti » Sat Aug 06, 2016 9:58 pm

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-)

Online
User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1275
Joined: Fri Jun 28, 2013 1:22 am
Location: East Dubuque Illinois
Has thanked: 2 times
Been thanked: 90 times

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

Postby Robert Sample » Sat Aug 06, 2016 11:10 pm

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: 2392
Joined: Sun Apr 21, 2013 7:40 pm
Location: Mumbai, India
Has thanked: 152 times
Been thanked: 66 times

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

Postby Anuj Dhawan » Sun Aug 07, 2016 12:25 pm

Shahid wrote:Source of the post 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


Topic author
Shahid
Registered Member
Posts: 40
Joined: Sun Aug 25, 2013 1:00 am
Has thanked: 12 times

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

Postby Shahid » Mon Aug 08, 2016 1:45 pm

enrico-sorichetti wrote:Source of the post
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?




Topic author
Shahid
Registered Member
Posts: 40
Joined: Sun Aug 25, 2013 1:00 am
Has thanked: 12 times

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

Postby Shahid » Mon Aug 08, 2016 1:49 pm

Robert Sample wrote:Source of the post
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.



Online
User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1275
Joined: Fri Jun 28, 2013 1:22 am
Location: East Dubuque Illinois
Has thanked: 2 times
Been thanked: 90 times

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

Postby Robert Sample » Mon Aug 08, 2016 3:43 pm

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



Online
User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1275
Joined: Fri Jun 28, 2013 1:22 am
Location: East Dubuque Illinois
Has thanked: 2 times
Been thanked: 90 times

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

Postby Robert Sample » Mon Aug 08, 2016 6:17 pm

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.




Topic author
Shahid
Registered Member
Posts: 40
Joined: Sun Aug 25, 2013 1:00 am
Has thanked: 12 times

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

Postby Shahid » Thu Aug 11, 2016 12:29 pm

Anuj Dhawan wrote:Source of the post
Shahid wrote:Source of the post 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?




Topic author
Shahid
Registered Member
Posts: 40
Joined: Sun Aug 25, 2013 1:00 am
Has thanked: 12 times

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

Postby Shahid » Thu Aug 11, 2016 12:31 pm

Robert Sample wrote:Source of the post 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.




Topic author
Shahid
Registered Member
Posts: 40
Joined: Sun Aug 25, 2013 1:00 am
Has thanked: 12 times

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

Postby Shahid » Thu Aug 11, 2016 12:35 pm

Robert Sample wrote:Source of the post
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: 822
Joined: Wed Sep 11, 2013 3:57 pm
Been thanked: 69 times

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

Postby enrico-sorichetti » Thu Aug 11, 2016 3:16 pm

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-)

Online
User avatar

Robert Sample
Global Moderator
Global Moderator
Posts: 1275
Joined: Fri Jun 28, 2013 1:22 am
Location: East Dubuque Illinois
Has thanked: 2 times
Been thanked: 90 times

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

Postby Robert Sample » Thu Aug 11, 2016 6:15 pm

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.




Return to “JCL - Job Control Language.”

Who is online

Users browsing this forum: CommonCrawl [Bot] and 0 guests