Corporate Training
Request Demo

JCL Interview Questions and Answers

by Mohammed, on Apr 2, 2018 4:49:53 PM

JCL Interview Questions and Answers

Q1. What is JCL?

Ans: JCL is Job Control Language and is used for Batch processing. The startup procedure of OS and standard products like CICS etc are written in JCL. It is interface between operating system(MVS) and application program. When 2 related programs are combined together on control statements is called job contol language

Q2. What is a Generation Data Group (GDG)?

Ans: Generation Data Group is a group of chronologically or functionally related datasets. GDGs are processed periodically, often by adding a new generation, retaining previous generations, and sometimes discarding the oldest generation.

Q3. How do you check the syntax of a JCL without running it ?

Ans: TYPERUN=SCAN on the JOB card or use JSCAN.

Q4.  How is a GDG base created?

Ans: A GDG base is created in the system catalog and keeps track of the generation numbers used for datasets in the group. IDCAMS utility is used to define the GDG base.

Q5. Name some of the JCL statements that are not allowed in procedures?

Ans: Some of the JCL statement which are not allowed in procedures are :

1. JOB, Delimiter(/*), or Null statements
2. JOBLIB or JOBCAT DD statements
3. DD * or DATA statements
4. Any JES2 or JES3 control statements

 Q6. What is model dataset label(Model DSCB)?

Ans: A model dataset label is a pattern for the dataset label created for any dataset named as a part of the GDG group. The system needs an existing dataset to serve as a model to supply the DCB parameters for the generation data group one wishes to create. The model dataset label must be cataloged. The model DSCB name is placed on the DCB parameter on the DD statement that creates the generation data group.

Q7. What is the purpose of include statement in a JCL?

Ans: It is used as an alternative for STEPLIB.. When we specify the dataset name in include it will search in all the datasets specified in the include dataset.

Q8. What is the difference between the JOBlIB and the STEPLIB statements?

Ans: The JOBlIB statement is placed after the JOB statement and is effective for all job steps. It cannot be placed in a cataloged procedure. The STEPLIB statement is placed after the EXEC statement and is effective for that job step only. Unlike the JOBLIB statement, the STEPLIB can be placed in a cataloged procedure.

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

Q10. What does S0C4 error mean?

Ans: This error is faced when execute the COBOL program. The main reason for this error is that a variable is defined with less characters and we are trying to move data which is larger than the actual storage space.

Q11. What is the meaning of keyword in JCL? What is its opposite ?

Ans: A keyword in a JCL statement may appear in different places and is recognized by its name, e.g. MSGCLASS in the JOB statement. The opposite is positional words, where their meaning is based on their position in the statement, e.g. in the DISP keyword the = (NEW. CATLG, DELETE ) meaning are based on first, second and third position.

Q12. What is primary allocation for a dataset?

Ans: The space allocated when the dataset is first created.

Q13. What is NOTCAT 2 - GS?

Ans: This is an MVS message indicating that a duplicate catalog entry exists. E.g., if you already have a dataset with dsn = 'xxxx.yyyy' and u try to create one with disp new, catlg, you would get this error. the program open and write would go through and at the end of the step the system would try to put it in the system catalog. at this point since an entry already exists the catlg would fail and give this message. you can fix the problem by deleting/uncataloging the first data set and going to the volume where the new dataset exists(this info is in the msglog of the job) and cataloging it.

Q14. How do you pass parameters to the program as the job is being executed?

Ans: By using 'parm' parameter in exec statement. the value mentioned here should be declared in linkage section in the program and process thru procedure division. this technique is very useful when you do not know the parameters at the time of coding the programs.

mytectra_reviews_data_science_hemant

 

Q15. Which statement is used to end the in-stream procedure in a JCL?

Ans: PEND statement is used to end the in-stream procedure.

Q16. What is the difference between specifying DISP = OLD and DISP = SHR for a dataset?

Ans: OLD specifies exclusive use of a dataset, SHR allows multiple jobs to concurrently access the dataset NOTE: When updating a dataset, you would normally use OLD.

Q17. How do you submit JCL via a COBOL program?

Ans: Use a file//dd1 DD sysout = (*,intrdr) write your JCL to this file. Please some one try this out.

Q18. What is use of SPACE parameter in DD statement?

Ans: The SPACE parameter specifies the space required for the dataset in the DASD (Direct Access Storage Disk). Syntax − SPACE = (spcunits, (pri, sec, dir), RLSE)

Q19. Definition of COND parameter in JCL?

Ans: COND is a condition parameter, consists of 2 sub parameters, 1st - return code from the previous step, 2nd - condition. If COND is true, the step on which COND is coded will be BYPASSED.

Q20. What DISP parameter we mention for creation of temporary dataset so that we can use it in later steps?

Ans: DISP = (NEW,PASS). PASS is valid only for normal disposition. This is used when the dataset is to be passed and processed by the next job step in a JCL.

Q21. What is S0C7 abend?

Ans: Caused by invalid data in a numeric field.

Q22. How do you access a file that had a disposition of KEEP ?

Ans: Need to supply Volume Serial Number VOL=SER=xxx.

Q23. How do you restart a step in JCL?

Ans: Use RESTART =step name.

Q24. When can a job time-out occur? How to overcome that?

Ans: A job time-out error can occur when the program takes more time than the time limit for the specified class. This is called a S322 abend. This error is encountered when there are some looping errors in the program and it does not reach completion.
If the data processed in the program is genuinely huge and needs more time than the class limit, then the TIME parameter can be coded as TIME = 1440 to get infinite time until job completion.

Q25. What is the purpose of coding CLASS parameter in job statement?

Ans: 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.

Topics:JCL Interview Questions And AnswersInformation Technologies (IT)

Comments

Subscribe

Top Courses in Python

Top Courses in Python

We help you to choose the right Python career Path at myTectra. Here are the top courses in Python one can select. Learn More →

aathirai cut mango pickle

More...