Saturday, 10 August 2013

JCL Parameters | Positional Parameters and Keyword Parameters.

Keyword Parameters.
Positional Parameters and Keyword Parameters.

In this Keyword Parameter and Positional Parameter tutorial, you'll learn about the importance of these JCL parameters and how to code these parameters in JCL statements. I will explain important Keyword and positional parameters with an example for better understanding. When you complete this tutorial, you’ll be able to code a wide variety of keyword and positional parameters in the JCL. So, without wasting any more time, let's start with the JCL keywords and positional parameter's tutorial.

What is JCL?


z\OS Job Control Language consists of a set of JCL statements that are used in jobs to control program execution, data allocation, and output processing. A job begins with a JOB statement. After that, most JCL statements are grouped into job steps. Each job step starts with an EXEC statement and contains the statements that are needed to execute one program. A single z\OS job can have 255 max steps. 

What are the JCL Parameters? 


How to code JCL is largely a matter of learning how to code the parameters correctly in the parameters field of each JCL statement. That’s because most JCL statements can have dozens of parameters that can be coded in many different ways. 

To begin, you need to understand that JCL statement can have two types of JCL parameters i.e. Positional Parameter or Keyword Parameters. You should always follow a rule of thumb i.e. All positional parameters should be preceded all keywords parameters. 

What are the Positional Parameters?



Positional parameters are coded first in the JCL parameters field, and the operating system interprets their meaning based on the order in which they’re presented. If you omit a positional parameter, you usually code an extra comma as a placeholder for it

List of important Keywords Parameters: 

  • Accounting Information
  • Programmer Name 
  • PGM on EXEC Statement
  • DD on DD statement.


Positional Parameters Example: 

Two positional parameters 

//RCTX01A JOB 99912,'RC IBMZOS'

Note: In the above mention job card there are two positional parameters i.e. JOB accounting information and programmer name. 

Two positional parameters when the first one isn’t coded 

//RCTX01A JOB ,'RC IBMZOS'

Note: In the above mention job card there is one positional parameter i.e. programmer name. However accounting information is skipped, so comma (,) used to specify the skipped positional parameters

What are the Keywords Parameters? 


A keyword parameter isn’t interpreted based on its position in the parameters field. Instead, you identify the parameter by coding a keyword followed by an equals sign (=) and a value. When you code a JCL statement that has more than one keyword parameter, you can code the parameters in any order you wish. However, keyword parameters must always come after any required positional parameters.

List of important Keywords Parameters: 


  • CLASS
  • MSGCLASS
  • MSGLEVEL
  • TIME
  • TYPRUN
  • PRTY
  • REGION
  • NOTIFY

Keywords Parameters Example:

Two keyword parameters 

//PAYMAST DD DSN=RC01.INFMNTH.EMPPAY,DISP=SHR

Two keyword parameters with positional subparameters 

//PAYMAST DD DSN=RCTX.INFMNTH.FILE,
//           DISP=(NEW,CATLG,DELETE),
//           UNIT=SYSDA,SPACE=(CYL,(10,5,2)),
//           DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)

Top 5 Interview questions related to Positional Parameters and Keywords Parameters.

  • What are the different JCL parameters?
  • In JCL, there are basically 3 types of parameters i.e. Positional Parameters, Keywords Parameters, and subparameters. However, subparameters are positional parameters. 
  • Can you code the Keywords parameter before the positional parameters?
  • No, positional parameters should be coded before any keywords parameters. 
  • What are the keywords parameters and positional parameters on JOB and DD statements?
  • Accounting information and programmer name are positional parameters on the JOB card.  
  • DCB, UNIT, DISP, etc. are keywords parameters in the DD statements. 
  • Is it possible to skip positional parameters in the JOB card?
  • Yes, the positional parameter can be skipped. But you need to specify comma (,) in place of skipped parameters. 
  • Is PGM a Keyword or positional parameters?   
  • No, PGM is keyword parameters and should be coded after the EXEC parameter.
Created with Artisteer

No comments:

Post a comment