PRIORITY Parameter Example


Scenario1 - JOB with priority parameter.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP1 JOB (META007),'PAWAN Y',CLASS=A,PRTY=9

Explaining Example -

In the above example: the JOB statement requests the system with the priority 9 within class A.

Scenario2 - Two jobs with same class but different priority.

JOB-A -

//MTHEXMP1 JOB (META007),'PAWAN Y',CLASS=A,PRTY=9

JOB-B -

//MTHEXMP2 JOB (META007),'PAWAN Y',CLASS=A,PRTY=11

What will happen if both jobs are submitted at the same time?

In the above example: JOB-B has the highest priority (11) within CLASS 'A'. JOB-B starts executing before JOB-A even though JOB-A and B are submitted at the same time.

Scenario3 - Two jobs with same class and same priority.

JOB-A -

//MTHEXMP1 JOB (META007),'PAWAN Y',CLASS=A,PRTY=9

JOB-B -

//MTHEXMP2 JOB (META007),'PAWAN Y',CLASS=A,PRTY=9

What will happen if both jobs are submitted at the same time?

Results are ambiguous.

Scenario4 - JOB with no prority parameter.

Code -

----+----1----+----2----+----3----+----4----+----5----+
//MTHEXMP1 JOB (META007),'PAWAN Y',CLASS=A

Explaining Example -

In the above example: JOB has no PRTY parameter. System applies the default priority in the class A and start executing the job.