1.

Explain different types of Job control statements or JCL statements.

Answer»

For each job that you submit, you need to specify where the input should be found, how it should be processed, and what should be done with the output. The INFORMATION is conveyed to MVS (Multiple Virtual Storage) through a set of statements called job control statements in JCL. MVS can glean a great deal of information from JCL's extensive set of job control statements. A very small set of these control statements can, however, be used to run most jobs. In time, you may discover that you only need to know the DETAILS of a few of the control statements as you become familiar with the jobs you TYPICALLY run. 

Types of Job Control Statements

 Job control statements can be classified into the following three types:  

  • JOB Statement: It is the first of three control statements in JCL, which tells the mainframe OS (Operating System) about the job identity. Besides Job name and accounting data, there are other parameters in the JOB statement such as class, msgclass, and msglevel. These parameters facilitate the OS in allocating the appropriate scheduler. Also, it is useful for monitoring CPU utilization and sending notifications to the user.

Syntax:  

//Job-name JOB Positional-param, Keyword-param

Here, 

  • Job-name specifies a name for the job and APPEARS after "//". It can have a length of 1-8 alphanumeric characters.
  • The keyword 'JOB' identifies it as a JOB statement.
  • Positional-param means positional parameters and keyword-param means keyword parameter.

Example:

//JOB011 JOB (456),'INTERVIEWBIT', //  CLASS=A
  • EXEC Statement: It stands for EXECUTION. The EXEC statement specifies a program/job-step, as well as utilities and procedures to be executed. There can be 255 steps in a JCL, which means it can have 255 'EXEC' statements.

Syntax: 

//Step-name EXEC Positional-param, Keyword-param

Here, 

  • Step-name specifies a name for the job step and appears just after “//”.
  • The keyword 'EXEC' identifies it as an EXECUTION statement.
  • Positional-param means positional parameters and keyword-param means keyword parameter.

Example:

//STEP01 EXEC PGM=INTERVIEWBIT
  • DD Statement: DD stands for Data Definition and helps in SPECIFYING the data sets used by a program or procedure. For each job step, the required input and output resources must be described in a DD statement. DD statements are required for every data set used or created in a job step. Up to 3273 DD statements are allowed in a step.

Syntax: 

//DD-name DD Parameters 

Here, 

  • DD-name specifies a name for DD-statement and appears just after “//”.
  • The keyword 'DD' identifies it as a DD statement.
  • Parameters represent different types of parameters for DD statements.

Example:

//STEPLIB DD  DSN=hlq.xxxxxxxx.CDBALOAD,DISP=SHR


Discussion

No Comment Found