Introduction to JCL Interview Questions and Answers
JCL is actually standing for Job Control Language. JCL is mainly handling all the mainframe related job, is able to define one job, control the same for ensuring proper logical execution of define programs and helping to get desired output as schedule by that specific job. JCL is normally designed in such a way so that it may contain multiple steps, and every steps holding the business logic to be executed or some specific define task which needs to be complete. JCL normally links all the define program and input or output files in the backend job batch environment.
Now, if you are looking for a job which is related to JCL then you need to prepare for the 2019 JCL Interview Questions. It is true that every interview is different as per the different job profiles. Here, we have prepared the important JCL Interview Questions and Answers which will help you get success in your interview.
In this 2019 JCL Interview Questions article, we shall present 10 most important and frequently asked JCL interview questions. These interview questions are divided into two parts are as follows:
Part 1 – JCL Interview Questions (Basic)
This first part covers basic Data Structure Java Interview Questions and Answers.
Q1. Suppose we had 3 DD name in concatenated approach with multiple datasets, the question is how can we override one another dataset on those specific 3 datasets?
By using DD DUMMY. If you need to override 1 dataset to another then DD DUMMY will help to override any JCL job steps easily. Please note, those are overridden not overwritten.
//STEP1.IN1 DD DUMMY
// DD DSN=OWNDATA.OURMI.IN2,DISP=SHR
// DD DUMMY
Q2. We can able to maintain multiple version in GDG, suppose if current version is using to consider as input in the first step (step 1) of any job, output also been created a new version, And the same way if step1 output can be considered as input of next step suppose step2, output of step2 again going to create one new version, then please explain how we indicating every GDG require version for each step?
We can easily do the same by using +1 or +2 operator without any specific logic. Please find below code snippet which defines references of multiple version of GDG:
Stp1 input: (0)
Stp1 output: (+1)
Stp2 input: (+1)
Stp2 output: (+2)
Let us move to the next JCL Interview Questions.
4.5 (433 ratings)
Q3. Is it possible to check empty file or not in JCL? If yes, then please explain how we can do this?
Yes, it is possible to identify one empty file in JCL, but in one condition, that file should be one input of IDCAMS. If one has been used as INPUT in IDCAMS, then when the job is completed and the input file is actually empty, in that case, code 4 will be return back as output for that specific JCL job. So return code 4 of any kind of JCL job can be considered as empty file choosing as input for the job. Normally developer managing the same in a different way, if the return code came as 4, then the job is automatically terminated, not require to process further for the next executable logic. As empty file normally not require to process further as it will take minimum space in the mainframe system, and it is well aware that mainframe system cost is too high, so handling this kind of error will be a require expertness for any mainframe or JCL job developer.
Q4. Suppose considering one JCL job have 4 steps and surprisingly suddenly job has been abended. Now give some commands or explain how we can start the step 2 of that specific JCL job?
This is the common JCL Interview Questions asked in an interview. Several responsibilities normally need to follow by a JCL tester in current IT industry.
It needs to be mention RESTART = STP2 in the statement of the job. JCL job should need to be constructed in such a way so that RESTART can be done in step 2 and accordingly step 3 and 4 will be executed sequentially. For the same IF-ELSE statement also need to be included.
//URMIIF JOB 1, CLASS=4, MSGCLASS=0, NOTIFY = &SYSUID,RESTART=STP2
//IF1 IF (STP2.RC = 0 & STP2.RC <> 0) THEN
Q5. Explain in details of available ways to requiring data passing into a cobol program from any JCL job?
There have several ways to pass require data in a cobol program from specific JCL job. It can be communicated by below three approaches:
Files: JCL job can able to send files directly to the cobol program, the program will be able to read the files and process based on the logic.
PARM Parameter: If JOB accepting some PARM parameter as input, then it can easily pass on to any define COBOL program for further process as per logic define by the COBOL developer.
SYSIN DD statement: SYSIN DD statement can pick up some system define parameter by any JCL job and send the same to a define COBOL program for further execution.
After sending require data to the Cobol program every JCL jobs are waiting for returning response from that program and deciding the JOB further process.
Part 2 – JCL Interview Questions (Advanced)
Let us now have a look at the advanced JCL Interview Questions and Answers.
Q6. Is it possible to call the same PROC by using many JOBS? If yes, then give detail explaining how it can be reused?
Yes possible. PROC mainly defined some static parts of the job which can be reused in any JCL job. As the example, file name change functionality can be defined inside a PROC and reuse by JCL job.
//IN1 DD DSN = &ID.OURMI.IN1, DISP = SHR //*PROC version
ID=OWNDATA1 is coded in JOB1, ID = OWNDATA2 is coded in JOB2 and so on
Q7. Is it possible to create one new dataset for JCL just maintain the same file like organization whereas it available in another dataset which is existing? If yes, please explain?
Possible by using IEBGENER. Existing file pass to SYSUT10, now pass new file in SYSUT11 and mention DCB=*.SYSUT10.
Let us move to the next JCL Interview Questions.
Q8. Explain in detail of accessing policy to an uncategorized JCL dataset in mainframe?
By using UNIT and VOL serial parameters.
Q9. Again assuming one JCL job have two steps, now we are willing to configure that if some reason step1 abends then step 2 will automatically run, else JCL job will be terminated? Explain how we can do this?
This is the most popular JCL Interview Questions asked in an interview. Some popular test cases in the current IT industry.
Provide some ONLY condition in step 2 it can be possible. The code will be like below:
COND = ONLY in STP2
Q10. Is it possible to perform one automated restart in case of JCL job abends? If yes, then explain how we can do this easily?
It is very much possible by using RD parameter in JCL job or exec statement. If some restart requires for the ABEND code then it needs to be mention in IBM parmlib library as SCHEDxx member.
This has been a guide to the list of JCL Interview Questions and Answers so that the candidate can crackdown these JCL Interview Questions easily. Here in this post, we have studied top JCL Interview Questions which are often asked in interviews. You may also look at the following articles to learn more –