JCL TYPRUN Parameter
JCL TYPRUN parameter is optional keyword parameter which can be used for –
- Specifying whether a job is to be kept on hold until the job is requested to be released.
- Syntax checking.
The Syntax for JCL TYPRUN parameter:
TYPRUN=SCAN
or
TYPRUN=HOLD
JCL TYPRUN=SCAN
This is used to scan the JCL for any syntax error without actually allocating any resources for the job.
Example of TYPRUN=SCAN
Explanation
In the above image, TYPRUN=SCAN enables to scan the JCL for syntax related errors without actually allocating any resource to the job. So, this is a good way to test your JCL for any syntax error without actually submitting the JCL and allocating resources.
JCL TYPRUN=HOLD
JCL TYPRUN=HOLD Parameter is used to avoid any deadlock.
Suppose, we have 2 Jobs i.e. JOBNOHLD and JOBHLD
JOB with no HOLD
//JOBNOHLD JOB (123),’TRAINOOL’,CLASS=A,
// NOTIFY=&SYSUID
//STEP01 DD DSN=MATEKS.TYPRUN.FILE,DISP=SHR
JOB with HOLD
//JOBHLD JOB (123),’TRAINOOL’,CLASS=A,TYPRUN=HOLD,
// NOTIFY=&SYSUID
//STEP01 DD DSN=MATEKS.TYPRUN.FILE,DISP=SHR
Both the jobs are trying to access the same dataset
In this case, both the jobs are trying to access the same dataset i.e. MATEKS.TYPRUN.FILE so, you need to hold one job until the other job has finished its operation.
So, here we have coded TYPRUN=HOLD on the Job JOBHLD. Now, Once the Job JOBNOHLD will complete its execution, we need to release the hold from JOBHLD.
This process is important to prevent deadlock (which is sometimes often called as Contention).
JCL InterView Question and Answers
1. What does TYPRUN = SCAN in a JCL do?
- It makes the JCL run fast
- It checks only for syntax of JCL and submit the Job
- It doesn’t check the syntax of JCL while submitting
- It checks only for syntax of JCL and not submit the job
- It checks only for syntax of JCL and not submit the job