JCL Interview Questions
JCL Interview Questions
JCL stands for Job Control Language. It is the command language of Multiple Virtual
Storage (MVS). It is the normally used in Operating System in the IBM Mainframe
computers.
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.
DD statement is used in JCL is used to identify the source of input and the placement of
output information.
8) Explain what EXEC statement is and what is the syntax of EXEC statement used in JCL?
EXEC statement holds the job step program or procedure information. The syntax of EXEC
statement used in JCL is
Both libraries specifies the private libraries that should be searched before the default
system libraries does in order to locate a program to be executed.
JCLLIB identifies the libraries that the system will search for include groups or
procedures named in EXEC statements
JOBLIB applies to all steps in the job while STEPLIB applies only to the particular
step.
10) Explain 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
11) Explain what JCL Procedures?
The JCL Procedures are nothing but a set of statements inside a JCL, grouped together to
perform a particular function. Procedure can be used to achieve parallel execution of a
program using multiple input files.
From the JCL, when the procedure is separated out and coded in a different data store,
then it is referred as a Cataloged Procedure.
13) Mention what happens when COND is coded in JOB statement and when COND is coded
inside EXEC statement?
When COND is coded in JOB statement, the condition is tested for every job step.
When the condition is true for any particular job step, it is bypassed along with the job
steps.
When COND is coded inside EXEC statement of a job step, and the condition is
true, then only that particular job step is bypassed, and execution will be carried out from
the next job step
14) Mention what is DSN in JCL and what are the parameters to declare the DSN?
In JCL, a dataset name determines the name of a file, and it is referred by “DSN.”
The DSN value can comprise of sub-names each of 1 to 8 characters length, separated by
periods and of total length of 44 characters (alphanumeric).
15) Explain how would you create a temporary dataset? And where will you use them?
Temporary dataset can by created either by specifying the temporary file indicator as in
SDN=&&Temp or by not specifying any DSName.
SOC4 error is for storage violation error and can be due to many reasons. For example,
invalid address due to script error.
17) Explain in ways data can be passed to a COBOL program from JCL?
Files
SYSIN DD statement
PARM parameter
18) Explain how you can access an uncataloged dataset in a JCL?
You can access an uncataloged dataset in a JCL by using the VOL and UNIT serial
parameters in the dataset DD statement.
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.
21) Is it possible to code instream data in a PROC?
In DD statement the use of DCB parameter is to give the detail information of the physical
characteristics of a dataset.
23) Explain how you can direct the data to spool using SYSOUT option?
You can direct the data to spool using SYSOUT option “SYSOUT=*”
24) Explain what is the difference between JES3 and JES2?
JES3 assigns datasets for all the steps before the job is scheduled.
JES2 assigns datasets required by a step just before the step executes.
25) Mention 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