Saturday, 3 April 2021

JCL Interview Questions and Answers | Mainframe Interview Questions [JCL Tutorial].

 

JCL Interview Questions, JCL tutorial, JCL

JCL Interview Questions.

Welcome back to today's JCL Interview Questions session. In this session, you'll go through the top 10 JCL Interview Questions. These questions focus on generation data groups (GDG), VSAM, and other JCL tricks. These JCL interview questions are a quick refresher for both experienced and freshers. Let's get started with JCL interview questions with answers.

Introduction to JCL.

The term JCL stands for Job Control Language. It's the command language of the z/OS operating system and it provides information related to the program and the datasets. JCL has three types of control statements i.e. JOB Control statement, Execute Statement, and DD statements.

Now, let's go through the top 10 JCL interview questions. 

What is the purpose of the PARM parameter in the EXEC statement? 

The PARM parameter is a method to pass data from JCL to the COBOL program. The maximum length of the PARM parameter is 100 bytes (i.e. 100 characters). The JCL PARM parameter is specified in the EXEC statement. The following JCL PARAM example explains, how to pass data from JCL to a COBOL program. 

JCL PARM Parameter example: 

//STEP01 EXEC PGM=EMP01,PARM=‘11/11/2021' 

What is the importance of the REGION parameter in JCL and on which JCL statement you can define it?

The REGION parameter sets the value of central or virtual storage that the step wants.

When a job step begins, the system allocates a region of storage space, that’s large enough to hold the program and any required control blocks. As the program executes, it can enlarge its region by acquiring additional storage. 

You can use the REGION parameter on a JOB or EXEC statement, to control the maximum amount of storage, that can be acquired for a job step’s region. Although the system also allows you to code REGION=0K, or REGION=0M to allocate all available storage.

JCL REGION Parameter Example: 

//STEP01   EXEC PGM=EPTAX,REGION=0M      

What is the application of the TIME parameter in JCL?

The TIME parameter in JCL is used to define the maximum amount of time that a mainframe job/JCL may use the CPU processor. The mainframe system terminates the job if it exceeds the defined time limit. You can define the JCL TIME parameters on both the JOB CARD and EXEC control statements. 

TIME parameter on JOB and EXEC statements example.

//TPTOPIC01 JOB (99921),'TOPICTRICK',TIME=1440
//STEP01    EXEC PGM=EMP01,TIME=50
  ......
  ......


What is the difference between the data definition name (DD name) and the Data Set name (DSN name) in the DD statement?

Well, the DSN name is used to provide the physical dataset name. However, DD name (i.e. data definition name) is an eight-character logic name corresponding to the actual data-set name. DD name begins after the "//". In the COBOL programs, the DD name is used to perform I/O operations. 

For Example: 

//DDNAME DD DSN=TP.TAX.FILE.NAME,DISP=SHR

What is the DUMMY data set in JCL and How to allocate a dummy data set in JCL?

A dummy data set is a data set that doesn’t exist. Instead, the system simulates the data set, allowing a program to process the file without actually having the file present. There are two ways to specify a dummy data set on a DD statement. You can code the DUMMY parameter, or you can specify DSNAME=NULLFILE.  DUMMY is a positional parameter and, if coded, must be the first parameter on the DD statement.


For example: 


//ddname DD DUMMY 

//ddname DD DSNAME=NULLFILE 


What does the keyword DCB mean and what are some of the keywords?

The term DCB stands for data control block. It is a keyword for the DD statement used to describe data sets attributes. The parameters associated with it are BLKSIZE, LRECL, RECFM etc. 


For example: 


//TAXFLE DD DSNAME=TP.DAILY.TAX.FILE,    

            DCB=(RECFM=FB,LRECL=80,BLKSIZE=800),

            DISP=SHR


How to create a temporary dataset in JCL?

In JCL, you have the facility of creating a temporary dataset. As the name suggests the temporary dataset in JCL is created and removed in the same mainframe job/JCL. The temporary dataset in JCL is created in the following ways:

 

  • DSNAME=&&dsname ►For a temporary data set
  • DSNAME=&&dsname(member) ► For a member of a temporary PDS or PDSE
  • No DSNAME parameter ► For a temporary data set to be named by the system

What is the difference between IDCAMS REPRO, IEBGENER, and IEBCOPY utility?

Well, IEBGENER, IDCAMS REPRO, and IEBCOPY are data copy utilities that are widely used on Mainframe. However, the application of each utility is different.
  • IEBGENER utility in JCL: is generally used to copy sequential datasets PDS or PDSE member. You can also apply filter criteria; change logical records length and block size of a dataset, and generate records.
  • IEBCOPY utility in JCL: is generally used to merge or copy members between one or more PDS (i.e. partitioned data sets), or PDSE (i.e. partitioned data sets extended).
  • IDCAMS REPRO in JCL: is generally used to copy sequential datasets. It is primarily used while dealing with VSAM datasets.

What is the difference between STATIC CALL & DYNAMIC CALL?

In the case of STATIC CALL, the called program and the calling program are part of the same load module. The called program always resides in the main memory. The compiler option is NODYNAM.

In a DYNAMIC CALL, the called program is compiled and stored separately. The called program is loaded into the main memory when it is required. The compiler option is DYNAM.

What is the difference between INSTREAM PROCEDURE and CATALOGED PROCEDURE?

JCL Procedure is a pre-written set of statements. JCL procedures are of two types: 
  • INSTREAM procedure in JCL is a set of statements that are written between PROC and PEND statements. You can invoke the instream procedure by the JCL EXEC statement.
  • CATALOGED procedure in JCL is a pre-written set of statements, the cataloged procedure tested and stored as procedure library (i.e. PROCLIB). Cataloged procedure in JCL is invoked by the JCL EXEC statements.

JCL Interview Question and Answers.


Conclusion.

Finally, this marks an end to today's JCL Interview Questions and Answers. This tutorial highlights the top 10 JCL interview questions and answers. These questions cover multiple different topics from JCL (JOB Control Language). Do check out our blog for various JCL tutorials. 

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

New In-feed ads