Monday, 8 April 2019

JCL Tutorial: JCL TYPRUN Parameter | TYPRUN=HOLD in JCL [Mainframe JOB].



JCL Tutorial, JCL TYPERUN, TYPERUN in JCL
How to hold a JCL Job?

Welcome back to today's JCL Tutorial. In this session, you'll learn the basics of "TYPRUN=HOLD" in JCL and "TYPRUN=SCAN" in JCL. You'll also learn, how you can use the TYPRUN parameter to hold the mainframe job. Let's get started with today's JCL Tutorial Agenda.

    Agenda - JCL Tutorial.

  • JCL Introduction.
  • JCL TYPRUN Parameter.
  • JCL TYPRUN Syntax.
  • JCL TYPRUN Example.
  • Summary.

JCL Introduction. 

The term JCL stands for JOB CONTROL LANGUAGE. It's the command language of the Z/OS Operating System. JCL is generally used to provide information related to datasets and programs that need to be executed. 
 

Is it possible to hold a job? 

Well, the answer is yes, a mainframe 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 been completed.

JCL TYPRUN Parameter.

JCL TYPRUN parameters are optional parameter and it is generally specified in JOB control statements. TYPRUN in JCL is primarily used to hold the mainframe job. You can also use JCL TYPRUN to scan mainframe jobs for syntax errors without executing the JCL. 

JCL TYPRUN Syntax. 

TYPRUN in JCL is pretty simple and easy to use. It has four possible following values. Let's look at each value in detail.

            TYPRUN={COPY}
                   {HOLD}
                   {JCLHOLD}
                   {SCAN}
  • When you specify TYPRUN=COPY, then JES2 is instructed to copy the input job stream as-is to an SYSOUT data set and schedule the SYSOUT data set for output processing.
  • When you specify TYPRUN=HOLD, the mainframe job is on hold until it is released by the operator.
  • When you specify TYPRUN=JCLHOLD, check for JCL error when the operator releases the job.
  • When you specify TYPRUN=SCAN, the system scans the mainframe job for syntax errors, without executing or allocating devices. 

JCL TYPRUN Examples.

As you that TYPRUN in JCL is optional and it is generally specified in the JOB control statement. JCL TYPRUN has four possible values. Let's try to understand each TYPRUN parameter with an example. 
 
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 TYPERUN=HOLD, JCL TUTORIAL

JCL TYPRUN=HOLD


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 Tutorial, JCL TYPERUN=SCAN, JCL TYPERUN=HOLD

JCL TYPRUN=JCLHOLD

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 TYPRUN=SCAN

JCL TYPRUN=JCLHOLD


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 TYPRUN, TYPRUN in JCL

JCL TYPRUN=JCLHOLD

In most production environments. Clients generally used workload schedular such as CA7, TWS, etc. But, you can still use TYPRUN in JCL to scan jobs for syntax errors or hold the mainframe job if you're running JCL outside the workload scheduler. 

Summary. 

Finally, this marks an end to today's TYPRUN in JCL Tutorial. In this session, you learn how to define and use TYPRUN parameters in JCL's. You also learn different variants of TYPRUN parameters. Don't forget to join us for the next tutorial on "How to write and execute Rexx Programs". Do checkout out CA7 Command Reference.

►Subscribe to Topictrick & Don't forget to press THE BELL ICON to never miss any updates. Also, Please visit mention the link below to stay connected with Topictrick and the Mainframe forum on - 

► Youtube
► Facebook 
► Reddit

Thank you for your support. 
Mainframe Forum™

No comments:

Post a Comment