JCL Mainframe Interview question and answers

JCL Mainframe Interview question and answers

Mainframes Online training1. What is JCL?

ANS: It is an interface between operating system (MVS) & the application program. When two related programs are combined together on control statements, it is called job control language

2. What are the basic JCL Statements for a Job?

ANS: The basic JCL statements for any job are:

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.

3. What do you mean by INCLUDE statement in JCL?

ANS .An INCLUDE statement identifies a member of a PDS that contains this set of JCL statements is called an INCLUDE group. The system replaces the INCLUDE statement with the statements in the INCLUDE group.

4. Why do you use a CONTROL CARD?

ANS: A CONTROL CARD can be a member of a PDS or a sequential dataset and is used for storing the date fields, definitions of VSAM files etc., We use CONTROL CARD because we cannot use an in-stream procedure in a procedure. Generally you will be calling a PROC from your JCL and you cannot code in stream procedure in the PROC and so you will point to the dataset, which is called control card.

5. How do you submit JCL via a Cobol program?

ANS: In your JCL define as: //JOBA JOB 1111,JOB1 //STEP01 EXEC PGM=PROG1 //ddname DD SYSOUT=(*,INTRDR)….and your COBOL (PROG1) should look like this: SELECT JCL-FILE ASSIGN TO ddname. Open this file and write the JCL statements into this file. Example: MOVE ‘//TESTJOB JOB 1111,VISVEISH’ TO JCL-REC.MOVE ‘//STEP01 EXEC PGM=IEFBR14’ TO JCL-REC.and close this file. Then TESTJOB will be submitted.

6. How to pass the temp dataset form one JOB step to another?

ANS: By specifying the DISP as PASS for the temp dataset.

7. How many types of libraries are there in JCL?

ANS: Libraries are of three types: System Libraries:- such as SYS1.LINKLIB Private Libraries:- Specified in a JOBLIB or STEPLIB DD STATEMENTS. Temporary Libraries:- Created in a previous step of the Job.

8. What you mean by skeleton JCL?

ANS: JCL, which changes during run time, that is the values for the JCL such as program name, dd name will change. The same JCL can be used for various jobs, equivalent to dynamic SQL;

9. Which type of override parameter requires that one know the parameters that can be overridden?

ANS: Regular parameters require that one know the parameters that can be overridden, such as step names within the procedure, the DDnames of the statements overridden, and the order of the DD statements.

10. What is the difference between an in-stream procedure and a catalogued procedure?

ANS: An In-stream procedure is basically same as a catalogued procedure. The difference is that to execute an in-stream procedure one places it after the JOB statement and before the EXEC statement and must end it with a PEND statement. A catalogued procedure is catalogued on a procedure library and is called by specifying the procedure name on the EXEC statement. An in-stream procedure is useful to test the procedure before making it a catalogued procedure.

11. What is a data exception?

ANS:  A data exception error indicates an attempt to perform an arithmetic operation on non-numeric data. It can also occur from incorrect input data to a program that is not performing sufficient numeric testing on it before attempting arithmetic. The system completion code is 0C7.

12. How are different generations specified?

ANS: Different generations are specified by providing the dataset name and generation number for each GDG desired.

13. Why do you want to specify the REGION parameter in a JCL step?

ANS: To override the REGION defined at the JOB card level REGION specifies the max region size REGION=0K or 0M or omitting REGION means no limit will be applied.

14. What is STEPLIB, JOBLIB? What is it used for?

ANS: Specifies that the private library (or libraries) specified should be searched before the default system libraries in order to locate a program to be executed STEPLIB applies only to the particular step, JOBLIB to all steps in the job.

15. What is order of searching of the libraries in a JCL?

ANS: First any private libraries as specified in the STEPLIB or JOBLIB, then the system libraries such as SYS1LINKLIB The system libraries are specified in the link list.

16. What is S322 abend?

ANS: Indicates a time out abend Your program has taken more CPU time than the default limit for the job class Could indicate an infinite loop.

For Mainframes Online training please log on to http://www.revanthtechnologies.com