JCL Technical Interview Questions Answers and Explanations

11/07/2009 No Comment

JCL Technical Interview Questions Answers & Explanation.

What do you mean by INCLUDE statement in JCL?
Answer : 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.

What are S0C1, S0C4, S0C5, S0C7 ABENDs??
Answer :
S0C1 (Operation Exception Error) - May be due to
Missing or misspelled DD name ,Read/Write to unopened dataset ,Reading a dataset opened output mode Writing into a dataset opened input mode ,Called subprogram not found
S0C4 may be due to 

Missing Select statement (during compile) ,Bad Subscript/index ,Protection Exception
Missing parameters on called subprogram ,Read/Write to unopened file ,Move data from/to unopened file;
S0C5 May be due to 

Bad Subscript/index ,Close an unopened dataset ,Bad exit from a perform ,Access to I/O area (FD) before read;
S0C7 may be due to 

Numeric operation on non-numeric data ,Un-initialized working storage ,Coding past the maximum allowed subscript
S0CB might be due to 1.Division by Zero

Why do you use a CONTROL CARD?
Answer :
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 instream procedure in the PROC and so you will point to the dataset, which is called controlcard.

How do you submit JCL via a Cobol program?
Answer :
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.

How do you submit a JCL under CICS environment?
Answer :
Pass all the JCL codes to a COBOL variable (should be declared using OCCURS clause) and then write the line one by one to the spool using CICS commands like SPOOLClose, SPOOLOpen and SPOOLWrite. For more help refer CECI of CICS or CICS manual.

What is the parameter to be passed in the job card for the unlimited time, irrespective of the job class?
Answer :

Define COND parameter in JCL?
Answer :
COND is a condition parameter, consists of 2 subparameters, 1st - return code from the previous step, 2nd - condition. If COND is true, the step on which COND is coded will be BYPASSED. It is compared with system return code of previous step //STEP1 EXEC PGM=ABCD //STEP2 EXEC PGM=XYZ, cond=(4,lt) STEP 2 will be executed when system return code of step1 is less than 4.

What is meant by S0C-07 system ABEND codes
Answer :
S0C7 - Data exception error - you will get it whenever you are trying to move the low values or spaces into the numeric field, or compare the numeric fields with low values, or try to do some arithmetic operations on the low values. To avoid this you have to always initialize the numeric fields otherwise they will contain the low values.

How to pass the temp dataset form one JOB step to another?
Answer :
By specifying the DISP as PASS for the temp dataset

Write a JCL to execute a Job by 7:00 AM on Jan 20,1986?
Answer :
The code is: //*MAIN DEADLINE=(0700,B,012086)

How many types of libraries are there in JCL?
Answer :
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.
Related Posts

No comments :


Aired | The content is copyrighted and may not be reproduced on other websites. | Copyright © 2009-2016 | All Rights Reserved 2016

Contact Us | About Us | Privacy Policy and Disclaimer