Wednesday, April 19, 2017

Mainframe Interview Questions and Answers on JCL

Mainframe Interview Questions and Answers on JCL


1. Why do you want to specify the REGION parameter in a JCL step?
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

2. What does the TIME parameter signify ? What does TIME=1440 mean ?
TIME parameter can be used to overcome S322 abends for programs that genuinely need more CPU time TIME=1440 means no CPU time limit is to be applied to this step


3. What is COND=EVEN ?
Means execute this step even if any of the previous steps, terminated abnormally

4. What is COND=ONLY ?
Means execute this step only if any of the previous steps, terminated abnormally

5. How do you check the syntax of a JCL without running it?
TYPERUN=SCAN on the JOB card or use JSCAN

6. What does IEBGENER do?
Used to copy one SAM File to another Source Data Set should be described using SYSUT1 ddname Destination Data Set should be decribed using SYSUT2 IEBGENR can also do some reformatting of data by supplying control cards via SYSIN

7. How do you send the output of a COBOL program to a member of a PDS?
Code the DSN as pds(member) with a DISP of SHR The DISP applies to the pds and not to a specific member

8. I have multiple jobs ( JCLs with several JOB cards ) in a member What happens if I submit it?
Multiple jobs are submitted (as many jobs as the number of JOB cards)

9. I have a COBOL program that ACCEPT some input data How do you code the JCL statement for this? ( How do you code instream data in a JCL?
) //SYSIN DD* input data input data /*

10. Can you code instream data in a PROC ?
No

11. How do you overcome this limitation ?
One way is to code SYSIN DD DUMMY in the PROC, and then override this from the JCL with instream data

12. How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?
To run a non DB2 program, //STEP001 EXEC PGM=MYPROG To run a DB2 program, //STEP001 EXEC PGM=IKJEFT01 //SYSTSIN DD * DSN SYSTEM() RUN PROGRAM(MYPROG) PLAN() LIB() PARMS() /*

13. What is STEPLIB, JOBLIB? What is it used for?
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

14. What is order of searching of the libraries in a JCL?
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 linklist

15. What happens if both JOBLIB & STEPLIB is specified ?
JOBLIB is ignored

16. When you specify multiple Data Sets in a JOBLIB or STEPLIB, what factor determines the order?
The library with the largest block size should be the first one

17. How to change default proclib ?
//ABCD JCLLIB ORDER=(MEMYPROCLIB,SYS1PROCLIB)

18. The DISP in the JCL is MOD and the program opens the File in OUTPUT mode What happens ?
The DISP in the JCL is SHR and the pgm opens the File in EXTEND mode What happens ?
Records will be written to end of File (append) when a WRITE is done in both cases

19. What are the valid DSORG values ?
PS - SAM, PO - Partitioned, IS - ISAM

20. What is S322 abend ?
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

Jobs in india

IT / Software Jobs,Core Technical Jobs, Government Jobs,Defence Jobs,Research Jobs,BPO Jobs,Bank Jobs, Tech Support Jobs,Health Care Job...