set job priority



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

set job priority

Postby GeorgeQ » Sat Jun 24, 2017 3:01 am

Hello.

I have two jcl jobs, JOB1 and JOB2

I want Job1 run firstly then Job2, currently their job class are same(CLASS=L). what change should I make to make job 1 run before job2?


Thanks!
GeorgeQ
 
Posts: 27
Joined: Fri Jun 16, 2017 1:08 am
Has thanked: 11 times
Been thanked: 0 time

Re: set job priority

 

Re: set job priority

Postby prino » Sat Jun 24, 2017 3:17 am

Submit JOB1 before JOB2!
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 537
Joined: Wed Mar 11, 2009 12:22 am
Location: Oostende, Belgium
Has thanked: 3 times
Been thanked: 21 times

Re: set job priority

Postby GeorgeQ » Sat Jun 24, 2017 3:20 am

Thank you!

How about ifI change job class of job1 from L to K? then job1 will be executed firstly?

Thanks!
GeorgeQ
 
Posts: 27
Joined: Fri Jun 16, 2017 1:08 am
Has thanked: 11 times
Been thanked: 0 time

Re: set job priority

Postby vasanthz » Sat Jun 24, 2017 3:58 am

Job class has no relation to the order in which jobs run. You need to submit job2 after job1 or have it setup in scheduler as a dependency.

A sloppy way is to submit both the job1 and job2 with the same job name and make one wait till another completes.
User avatar
vasanthz
 
Posts: 14
Joined: Thu Aug 05, 2010 2:53 pm
Has thanked: 2 times
Been thanked: 0 time

Re: set job priority

Postby Robert Sample » Sat Jun 24, 2017 4:14 am

There are only two ways to accomplish this;

1. Use a job scheduler and put a dependency on JOB2 to run after JOB1
2. Make sure that class L is assigned to only one initiator and submit JOB1. Once JOB1 starts executing, submit JOB2. If you submit JOB1 and JOB2 without verifying JOB1 has started executing, it is entirely possible for JOB2 to start executing before JOB1.

JES explicitly states that merely submitting JOB1 before JOB2 does not ensure that JOB1 will execute before JOB2 even if they are in the same job class. And if the two jobs are in different job classes, they may well be assigned to different initiators so JOB2 could run before JOB1, while JOB1 is running, or after JOB1.

And terminology is critical in IT, where similar terms may have very different meanings. None of this has anything to do with the job PRTY= option which may (or may not -- JES2 may ignore the option depending upon how the site is set up) be used on the JOB statement to control job processing priority. Using a post title of "set job priority" is very misleading about what you want to do.
Robert Sample
Global moderator
 
Posts: 3363
Joined: Sat Dec 19, 2009 8:32 pm
Location: East Dubuque, Illinois
Has thanked: 1 time
Been thanked: 221 times

Re: set job priority

Postby NicC » Sat Jun 24, 2017 4:50 pm

Another way is to have job 1 submit job2 as the last thing it does before finishing. Examples of all the options are around on the forum.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post