Monday, 8 April 2019

How to hold a JCL Job?




JCL
How to hold a JCL Job?

Question: Is it possible to hold a job? 

Well, the answer is yes, a job can be placed in a hold status so it won’t be scheduled for execution until an operator issues a command to release it. For example, you may want a run a job A until job B has completed.

You can code the TYPRUN=HOLD parameter on a JOB statement to place a job in hold status. 

The syntax for the TYPRUN parameter of the JOB statement


TYPRUN= {HOLD}     |- option checks for JCL errors when the job is submitted
        {JCLHOLD}  |- option checks for JCL errors when the operator
                      releases the job.



The syntax for the HOLD parameter of the JES3 //*MAIN statement

HOLD= {YES}
      {NO}

Four ways to hold a job


Example 1: The TYPRUN parameter uses the HOLD option to hold a job in the queue until the operator issues a command to release it.

JCL
Figure 1.

Example 2: The JCLHOLD option is similar to the HOLD option except that the JCL is not checked for errors until the operator releases the job.

JCL
Figure 2



Example 3: A held job class is specified in the CLASS parameter of the JOB statement. Once the operator changes the class, the job is released for processing.



JCL
Figure 3


Example 4: A JES3 //*MAIN statement HOLD parameter is used to hold the job in the queue. This has the same effect as coding TYPRUN=HOLD on the JOB statement.


JCL
Figure 4

However, in the live production environment, job hold feature is implemented by using the scheduler i.e. CA7, TWS etc.

If you like the post then please subscribe to my blog and share the post with your friends.



No comments:

Post a Comment