The TYPRUN parameter on the JOB statement specifies special processing options for a job. It allows you to request that the system check the JCL syntax without actually executing the job, hold the job for later release, or perform other special processing options. This can be particularly useful for testing new JCL or when you want to prepare jobs for execution at a later time.
1//jobname JOB parameters,TYPRUN=option
Option | Description |
---|---|
SCAN | Checks JCL syntax without executing the job. The system scans all JCL statements for syntax errors and returns messages, but does not execute any programs or allocate resources. |
HOLD | Places the job in hold status after converting the JCL. The job remains in the queue until released by an operator command or other mechanism. |
JCLHOLD | JES3 only. Similar to HOLD, but job is held until specifically released by a Modify (F) command. |
COPY | JES2 only. Job is processed by the JCL converter, then copied directly to the output processor. No execution occurs. Useful for creating job output without execution. |
1//TESTJOB JOB (ACCT),'SYNTAX CHECK',CLASS=A,TYPRUN=SCAN
The system checks JCL syntax but doesn't execute the job
1//HOLDJOB JOB (ACCT),'HOLD JOB',CLASS=B,TYPRUN=HOLD
The job is held in the queue after JCL conversion until it is released
1//COPYJOB JOB (ACCT),'COPY JOB',CLASS=C,TYPRUN=COPY
JES2 only: Creates job output without executing the job
1234$A 'jobname' /* JES2 command to release a job */ $TO JOB(jobname),RELEASE /* JES2 command to release */ *F J=jobname,R /* JES3 command to release a job */
Feature | TYPRUN | Alternative | Key Difference |
---|---|---|---|
Syntax checking | TYPRUN=SCAN | MSGLEVEL=(1,1) | MSGLEVEL produces detailed messages but attempts execution |
Job holding | TYPRUN=HOLD | /*HOLD statement | /*HOLD is a JES2 JECL statement, not standard JCL |
Job holding | TYPRUN=HOLD | SCHEDULE parameter | SCHEDULE provides more options for timed execution |
No execution | TYPRUN=COPY | EXEC PGM=IEFBR14 | IEFBR14 provides minimal execution vs. no execution |
1//WRONGUSE JOB (ACCT),'DEBUG',TYPRUN=SCAN // Won't debug program logic
1//ABANDONED JOB (ACCT),'FORGOTTEN',TYPRUN=HOLD // Will remain in queue
1//INCOMPATIBLE JOB (ACCT),'WRONG JES',TYPRUN=JCLHOLD // JES3 only
1//MISLEADING JOB (ACCT),'INCOMPLETE TEST',TYPRUN=SCAN // Won't catch runtime issues