Interview questions for JCL

1. Explain what is JCL?

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.

2. What Is Use Of Dsn Parameter In Dd Statement?

The DSN parameter refers to the physical dataset name of a newly created or existing dataset. The DSN value can be made up of sub-names each of 1 to 8 characters length, separated by periods and of total length of 44 characters (alphanumeric).

3. Explain 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.

4. Is it possible to check an 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.

5. What Is Use Of Disp Parameter In Dd Statement?

The DISP parameter is used to describe the status of the dataset, disposition at the end of the job step on normal and abnormal completion. DISP is not required in a DD statement only when the dataset gets created and deleted in the same job step (like the temporary datasets). Syntax − DISP = (status, normal-disposition, abnormal-disposition)

6. In Job Processing, What Happens In Execution Stage?

When the job reaches its highest priority, it is taken up for execution from the job queue. The JCL is read from the SPOOL, the program is executed and the output is redirected to the corresponding output destination as specified in the JCL.

7. Mention the types of job control statements?

The types of job control statements are
• JOB – to identify the Job
• DD – to supply the I/O files needed for the execution of the program
• EXEC – to identify which program has to be executed

8. 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.

9. Explain 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.

10. 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.

11. Which Utility Is Used A Dummy Utility?

IEFBR14 is no operation utility. Used to return control to user and terminate. It is usually used to create empty dataset or delete an existing dataset.

12. What Is Use Of Dcb Parameter In Dd Statement?

The Data Control Block (DCB) parameter details the physical characteristics of a dataset. This parameter is required for datasets that are newly created in the job step. LRECL is the length of each record held within the dataset. RECFM is the record format of the dataset.

13. What Is The Purpose Of Coding Class Parameter In Job Statement?

Based on the time duration and the number of resources required by the job, companies assign different job classes. These can be visualized as individual schedulers used by the OS to receive the jobs. Placing the jobs in the right scheduler will aid in easy execution of the jobs. Some companies have different classes for jobs in test and production environment. Valid values for CLASS parameter are A to Z characters and 0 to 9 numeric (of length 1). Following is the syntax − CLASS=0 to 9 | A to Z

14. How Do You Code A Null Statement?

JCL is terminated by a null statement which is optional. For a null statement code only // starting from column 1. All the lines after this will not be executed.

15. What Operation Is Performed By Job Statement?

Specifies the information required for SPOOLing of the job such as job id, priority of execution, user-id to be notified upon completion of the job.

leave your comment


Your email address will not be published. Required fields are marked *