JCL Interview Questions - JCL interview questions and answers by expert members with experience in JCL subject. Discuss each question in detail for better understanding and in-depth knowledge of JCL.
What is JCL?
JCL is Job Control Language and is used for Batch processing. The startup procedures of OS and standard products like CICS etc are written in JCL. It is interface between operating system(MVS) & application program. when 2 related programs are combined together on control statements is called job control language

What are three major types of JCL statements? What are their functions?
JOB - indicates start of job stream to the operating system and through parms coded on it, certain details about the job (time, region, message level, job accounting data).
EXEC - indicates the start of execution of a particular job step, be that step a program or a proc.
DD - is a data definition, which is used to describe the attributes of a data set (name, unit, type, space, disposition).

What is the use of JCL?
  • It is used for the deleting creating, the Data Sets, GDG’S and VSAM clusters.
  • It is used for comparing the files and PDS members
  • It is used for compiling and executing the programs which includes batch programs as well
  • It is used for merging and sorting of file data
What is a Generation Data Group (gdg)?
A generation Data Group is a group of chronologically or functionally related datasets. GDGs are processed periodically, often by adding a new generation, retaining previous generations, and sometimes discarding the oldest generation.

Name some of the JCL statements that are not allowed in procs?
Some of the JCL statements which are not allowed in procedures are:
  • JOB, Delimiter (/*), or Null statements
  • JOBLIB or JOBCAT DD statements
  • DD * or DATA statements
  • Any JES2 or JES3 control statements
What are the basic JCL Statements for a Job?
  • JOB: Identifies a job and supplies accounting info
  • EXEC: Identifies a job step by indicating the name of the program to be executed
  • DD: Identifies a data set to be allocated for the job step
  • Delimiter(/*): Marks the end of an in-stream dataset
  • Null(//): Marks the end of a job
  • Comments(//*): Provides Comments
  • PROC: Marks the beginning of a procedure
  • PEND: Marks the end of a procedure
  • OUTPUT: Supplies options for SYSOUT processing.
How JCL works?
JCL recognizes the program to be executed, the inputs that are required and location of the input/output and informs the Operating System through Job control Statements.
What is primary allocation for a dataset?
The space allocated when the dataset is first created.

How many extents are possible for a sequential file? for a VSAM file?
16 extents on a volume for a Sequential File and 123 for a VSAM File

What is COND=EVEN?
Means execute this step even if any of the previous steps, terminated abnormally.

What is COND=ONLY?
Means execute this step only if any of the previous steps, terminated abnormally.

What is the syntax of JCL statement?
The syntax of JCL statement is,
//Job-name JOB Positional-param, Keyword-param

What is RESTART? How is it invoked?
RESTART is a JOB statement keyword. It is used to restart the job at a specified step rather than at the beginning.

How do you restart a step in JCL?
Use RESTART=step name.

What is the purpose of the job statement?
The purpose of the JOB statement is to inform the operating system of the start of a job, give necessary accounting information and supply run parameters. Each job must begin with a single JOB statement.

How are in-stream procedures (procs) built?
In-stream procedures are built by coding a set of statements and placing them after the JOB statement and before the EXEC statement. In-stream procedures begin with a PROC statement and end with a PEND statement. Up to 15 in-stream procedures can be included in a single job.
Each in-stream procedures may be invoked several times within the job. In-stream procedures can use symbolic parameters in the same way as catalogued procedures.

What is an operation exception error?
An Operation exception error indicates that an operation code is not assigned or the assigned operations not available on a particular computer model. The machine does not recognize the instruction or operation used. A possible reason a subscript error. This error could also be caused by an attempt to read a file that was not opened a misspelled DD statement. The system completion code is 0C1.

What is the meaning of data definition name (dd name) and data set name (dsn name) in the dd statement?
Data definition name is the eight character designation after the // of the DD statement It matches the internal name specified in the steps executing program In COBOL that's the name specified after the ASSIGN in the SELECT ASSIGN statement Data Set name is the operating system (MVS) name for the File.

What is the purpose of the parm keyword in the exec statement?
The value after the PARM= specifies control information to be passed to the executing program of the job step

What is the improvement to cond= in the latest version of mvs?
MVS now allows for an IF bracketed by an END IF around any job step to replace the COND= syntax Again, if the IF statement is true, the step is bypassed.

What is the difference between a symbolic and an override in executing a proc?
A symbolic is a PROC placeholder; the value for the symbolic is supplied when the PROC is invoked, eg &symbol=value an override replaces the PROC's statement with another one; it substitutes for the entire statement.

What are SD37, SB37, SE37 abends?
All these abends are related to dataset out of space.
SD37 – This will occur if no secondary allocation was specified.
SB37 - This abend signifies the end of vol. and no further volumes specified.
SE37 – This abend comes if Max. of 16 extents already allocated.
What are S0C1, S0C4, S0C5, S0C7 and SOCB?
SOC1: An operation Exception Error that may occur because of missing DD name.
SOC4: An Exception Error that may occur because of missing Select statement, missing parameters on called sub program.
SOC5: This exception may occur when an unopened dataset is closed, bad subscript.
SOC7: This exception may occur when a numeric operation is performed on non-numeric data, working storage is not initialized.
SOCB: This operation error may occur when a ‘division by zero’ occurs.
What are the difference between JCL and JES?
  • JCL is a language.
  • JOBs written in JCL for Mainframe.
  • JOB is executed, space and other desired resource is allocated by the keywords of JCL.
  • JES is a subsystem of MVS.
  • JES handle the JOBs submitted by the users.
  • JES takes the control of JCL and generates JOB id.
  • JES validates JCL for errors.
What is DSN parameter and DISP parameter is used for?
DISP parameter: It is used to specify the disposition of dataset which is coded on DSN parameter
DSN parameter: It is used to specify the data set name

What does IEBGENER do?
Used to copy one QSAM file to another. Source dataset should be described using SYSUT1 ddname. Destination dataset should be decribed using SYSUT2. IEBGENR can also do some reformatting of data by supplying control cards via SYSIN.

What is the use of IEBGENER utility?
The use of IEBGENER utility is used for copying the data from
  • one PS to another PS
  • OR Member of a PDS to another PS
  • OR PS to member of PDS.
What is the difference between JES3 and JES2?
The difference between JES3 and JES2 is that,
  • JES3 assigns datasets for all the steps before the job is scheduled.
  • JES2 assigns datasets required by a step just before the step executes.
What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?
The difference between specifying DISP=OLD and DISP=SHR for a dataset is that,
DISP=OLD: It reads data from beginning of dataset. But incase if you try to modify or write, then it will overwrite existing data. i.e old data is lost
DISP=SHR: Its read-only file. In this, multiple user can share the data

What does a disposition of (NEW, CATLG, DELETE) mean?
That this is a new dataset and needs to be allocated, to CATLG the dataset if the step is successful and to delete the dataset if the step abends.

What does a disposition of (NEW, CATLG, KEEP) mean?
That this is a new dataset and needs to be allocated, to CATLG the dataset if the step is successful and to KEEP but not CATLG the dataset if the step abends. Thus if the step abends, the dataset would not be catalogued and we would need to supply the vol. ser the next time we refer to it.

What does a disposition of (MOD, DELETE, DELETE) mean?
The MOD will cause the dataset to be created (if it does not exist), and then the two DELETEs will cause the dataset to be deleted whether the step abends or not. This disposition is used to clear out a dataset at the beginning of a job.

This is a new file and create it, if the step terminates normally, pass it to the subsequent steps and if step abends, delete it. This dataset will not exist beyond the JCL.
Request to Download PDF


Vestibulum bibendum felis sit amet dolor auctor molestie. In dignissim eget nibh id dapibus. Fusce et suscipit orci. Aliquam sit amet urna lorem. Duis eu imperdiet nunc, non imperdiet libero.

Post A Comment: