Javatpoint Logo
Javatpoint Logo

JCL Interview Questions

JCL Interview Questions

Here is a list of most frequently asked JCL interview questions and their answers.

1) What is JCL?

JCL stands for Job Control Language. JCL is a scripting language used on IBM mainframe operating system to instruct the system for the batch job. It is a set of statements that you code to tell the operating system about the task you want to perform. Sometimes this set of statements is quite large, but most jobs can be run using a minimal subset.

JCL Interview Questions

JCL statements tell OS where to find the required input, how to process that input, and what to do with the resulting output.

2) How does JCL act on a COBOL code?

There are a particular set of divisions that deals with JCL.

Identification Division

Act as introductory part to JCL. It introduces program name, author, date, etc. no interacting code to JCL.

Environment Division

Environment division allows JCL to interact with OS. OS sends a request for Files under file operation.

Data Division

It works with the accessed file according to operations to READ or to PRINT files (with the help of OS).

Procedure Division

It contains various actions taken on files, e.g., to close files that are being used.

3) What is condition checking in JCL? Is this possible?

JCL supports condition checking. Condition checking is possible at both the job level and the code level. It is done through the COND keyword with a return code and operand as predefined in JCL. So it is feasible in JCL.

4) Does JCL support automatic restart?

It is possible to have an automatic restart in JCL through the help of some predefined keyword parameter. The RDkeyword is one of those keywords that are used to restart. It generally succeeds in an irregular termination of the program. Against the locale of the automatic restart, we need to consider the importance of checkpoints, which are used to define the job execution at various points in the program concerned.

5) Explain the JOB statement in JCL?

JOB statement gives the job identity to the Operating System (OS) in the spool and the scheduler. It is the first control statement in a JCL. The available parameters in the JOB statement help the OS in allocating the right scheduler. It is also useful for analyzing the required CPU time and issuing notifications to the user.


The basic syntax of a JCL JOB statement is below.

6) Explain the JCL EXEC statement?

A JCL can be made of many job steps, and a job step can execute a program directly, or it can call a procedure. Thus, JCL can execute one or more programs (job steps).

The statement, which contains the job step program information, is called the EXEC statement.

The motive of the EXEC statement is to provide the required information. This information is forwarded to the program that executes in the job step.


The basic syntax of a JCL EXEC statement is as follows.

7) What is the significance of ADDRSPC parameter in the EXEC statement?

The ADDRSPC parameter is used to specify the storage required by the system.

Some important points about ADDRSPC parameter are as follows.

  • It is an optional parameter.
  • The storage can be virtual or central.
  • The REGION parameter requests the storage for an individual step.
  • ADDRSPC prevents paging.
  • ADDRSPC=VIRT is used for paging.
  • Once ADDRSPC is set to REAL(ADDRSPC=REAL), the step would be locked into real storage, when executed.
  • Its effect is adverse to the performance of the system.

8) How does the JCL specify the JOB to OS?

JCL specify the job to the Operating System through the JCL groups. These groups are defined according to the work they produce. The steps for determining the job are as follows.

  • Identify the job.
  • Execute the program named by the user.
  • Several DD's that define the files being utilized.
  • Previous work should be closed operation, exit operation.

9) Explain DD statement in JCL?

Datasets are mainframe files that contain the records organized in a specific format. These files are stored on the Direct Access Storage Device (DASD) or Tapes of the mainframe and are basic data storage areas. If these data are required to be manipulated in a batch program, then the physical dataset name along with the file format is coded in a JCL.

DD statement's help gives the dataset definition that is used in JCL. The required input and output resources for a job step needs to be described within a DD statement. These resources must be specified with information such as the dataset organization, storage requirements, and record length.


The basic syntax for JCL DD is as follows.

10) How do you check the syntax of a JCL without running it?

We can check the syntax of JCL without running it by writing TYPERUN=SCAN on the JOB card or using JSCAN.

11) What are some JCL statements that are not allowed in procedures?

Some JCL statement that is not allowed in the procedure is as follows.

  • JOB, Delimiter(/*), or Null statements
  • JOBLIB or JOBCAT DD statements
  • DD * or DATA statements
  • Any JES2 or JES3 control statements

12) Why include statement is used in a JCL?

It is used as an alternative for STEPLIB. When we specify the dataset name in include statement, it will search in all the datasets defined in the included dataset.

13) Differentiate between the JOBLIB and the STEPLIB statements?

The comparison between JOBLIB and STEPLIB are as:

JOBLIB statement is used to identify the location of the program to be executed in a JCL. A STEPLIB statement is used to identify the location of the program to be executed within a JOB step.
It is specified after the JOB statement and before the EXEC statement. It is specified after the EXEC statement and before the DD statement of the job step.
It cannot be placed in a cataloged procedure It can be placed in a cataloged procedure
It's syntax is
It's syntax is

14) What is the use of symbol // in JCL?

It's an important symbol used in JCL statements. Each JCL statement must begin with this symbol. It is a predefined rule that is used to execute the JCL statements; otherwise, the JCL statement throws an error.

The JCL execution system first checks for the symbol (//) at the beginning of JCL statements. It avoids runtime exceptions.

15) Explain the hierarchy levels in JCL?

The level is the steps that describe the JCL statements according to their actions.

Every statement of JCL consist of the following keywords:

  • NAME

16) Differentiate between Addressing mode and Run mode.

The key differences between Addressing mode and Run mode are as follows.

Addressing mode or Access Mode Run Mode or Residency Mode
AMODE(24) indicates 24-bit addressing in the memory below the line. RMODE(24) indicates that the program needs to be loaded into the memory below the line.
AMODE(31) indicates 31-bit addressing in the memory above and below the line. RMODE(31) specifies the program need to be loaded into the memory either above or below the line.
AMODE=ANY, it specifies either 24-bit or 31-bit addressing methods. RMODE=ANY, it specifies the program to load either in 24-bit or 31-bit memory.

17) Which utility is used to run a COBOL-DB2 Program?

The IKJEFT01 utility is used to run a COBOL-DB2 program.

18) Which statement is used to identify the private libraries in JOB?

A JCLLIB statement is used to define the private libraries used in the job. It can be used with both cataloged and instream procedures.


The basic syntax of a JCL JCLLIB statement is as follows.

19) What are the Utility programs in JCL?

Utility programs are pre-written programs. These programs are widely used in mainframes by system programmers and application developers to achieve general requirements, maintaining and organizing data. Some of them are listed below.

  • IEFBR14

20) Explain DFSORT utility?

DFSORT is a powerful IBM utility. It is used to copy, sort, and merge datasets. The SORTIN and SORTINnn DD statements are used to specify input datasets. The SORTOUT and OUTFIL statements are used to determine output data.

DFSORT is purely mainframe related utility program which is used to process or manipulate sequential files with the help of JCL.


To create temporary data sets we use disp = (new,pass,delete). New creates a new data set and pass it for the next step. On successful execution, it passes the data set and deletes dataset from the system.

22) How can a FB file convert to VB file using SORT program?

A FB file can be converted to VB file by FTOV option in SORT program.

23) How to run COBOL program using JCL?

The program needs to be compiled, and a load module is created with all the sub-programs for the execution of the COBOL program in the batch mood. The JCL uses the load module instead of the actual program at the time of execution. The load libraries are patched and given to the JCL at the time of execution using JCLLIB or STEPLIB.

Below I am mentioning a JCL example in which the program MYPROG is executed using the input file MYDATA.URMI.INPUT. This program will produce two output files written to the spool.

24) What is a Generation Data Group (GDG)?

Generation Data Group is a group of sequential or functionally related datasets. They are handled periodically by adding a new generation, discarding the oldest generation, and sometimes retaining previous generations.

25) How do you create a temporary dataset? Where will you use them?

Temporary datasets can be created either by specifying the temporary file indicator as in DSN=&&TEMP or by not specifying any DSNAME. We use them to forward the output of one step to another step in the same job. The dataset will not be reserved once the job is completed.

26) What is NOTCAT 2 - GS?

NOTCAT 2-GS is an MVS message that shows a duplicate catalog entry exists. E.g., if we already have a dataset with dsn = 'xxxx.yyyy' and we want to create one with disp new, catlg, we would get this error.

When the program opens and write, it will go through, and at the end of the step, the system would try to put it in the system catalog. At this point, as we have an entry which already exists, the catlg would fail and give this message.

We can fix the problem by deleting the first data set and going to the volume where the new dataset exists and cataloging it.

27) What are the JCL procedures?

The JCL Procedures are a collection of statements inside a JCL. These statements are grouped to perform a particular function. A fixed part of the JCL is coded in a procedure, and the variable part of the Job is coded within the JCL.

We can use a procedure to achieve parallel execution of a program with the help of multiple input files. A JCL can be created for each input file, and a single procedure can be called simultaneously by passing the input file name as a symbolic parameter.


The basic syntax of a JCL procedure definition

The content of the procedures holds by the JCL for an instream procedure.

28) How do you submit a job for execution?

On Mainframes, when we want to perform any task, we have to write a Job and forward it to the Mainframe Computer for processing. This is known as submitting a job.

There are many ways in which you can submit a JOB from your CICS application program. We can do this by using CICS Spool Interface commands and write your JCL directly to JES Spool.

29) How to submit a JCL from CICS?

CICS provides a programming interface to JES (Job entry subsystem) of MVS. The JES interface allows CICS applications to create and retrieve spool files. To use the JES interface, you should have the DHFSIT SPOOL parameter set to YES (DFHSIT SPOOL=YES) in CICS installation.

CICS provides the 4 SPOOL interface commands that are used in a job submission. They are as follows.


All-access to a JES spool file must be completed in one task in a CICS program. It should be noted that any job that processes the data sets for more than 1000 records for I/O is likely to have a performance effect on the rest of CICS.

30) Suppose I have seven jobs to do, but I want to hold one than how can I do this?

It's a simple process to hold one job among available jobs. There is a predefined set of rules for that. According to JCL's predefined rules for jobs, there is a keyword in each job. We can hold a job for later execution and specify TYPRUN on the job statement. The TYPRUN is used to hold a job with its variable name to HOLD.



For the job you want to hold

You may also like:

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA