Latest Questions
Post Top Ad
Your Ad Spot
Thursday, June 20, 2019

50 Top JCL Interview Questions and Answers {Updated}

JCL Interview Questions and Answers for experienced PDF, Read commonly asked JCL Job Interview Questions with Answers PDF for Freshers.

Read JCL Interview Questions and Answers

What is the difference between primary and secondary allocations for a dataset?
Secondary allocation is done when more space is required than what has already been allocated.

How do you override a specific DDNAME/SYSIN in PROC from a JCL?
// DSN=…

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

What are the differences between JES2 & JES3?
JES3 allocates Data Sets for all the steps before the job is scheduled. In JES2, allocation of Data Sets Required by a step are done only just before the step executes. JOB /EXEC/DD ALL PARAMETERS JOBLIB/STEPLIB PROCEDURES, PARAMETERS PASSING CONDITION VARIABLES ABEND CODES.

How many extents are possible for a sequential file? For a VSAM file?
16 extents on a volume for a sequential file and 123 for a VSAM file.

What is NOTCAT?
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.

I have a COBOL program that ACCEPTs some input data. How do you code the JCL statement for this? ( How do you code instream data in a JCL? )

input data
input data

What are the kinds of job control statements?
The JOB, EXEC and DD statement

What does a disposition of (NEW, CATLG, DELETE) mean?
That this is a new dataset and needs to be allocated, to CATLG the dataset if the step is successful and to delete the dataset if the step abends.

What is ‘S0C7? abend?
Caused by invalid data in a numeric field.

Can you code instream data in a PROC?

What is the meaning of keyword in JCL? What is it's opposite?
A keyword in a JCL statement may appear in different places and is recognized by its name, eg MSGCLASS in the JOB statement The opposite is positional words, where their meaning is based on their position in the statement, eg in the DISP keyword the =(NEW, CATLG, DELETE) meaning are based on first, second and third position.

What does a disposition of (NEW, CATLG, KEEP) mean?
That this is a new dataset and needs to be allocated, to CATLG the dataset if the step is successful and to KEEP but not CATLG the dataset if the step abends. Thus if the step abends, the dataset would not be cataloged and we would need to supply the vol. ser the next time we refer to it.

What is an S0C4 error?
Storage violation error – can be due to various reasons. e.g.: READING a file that is not open, invalid address referenced due to subscript error.

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.

Describe the JOB statement, its meaning, syntax, and significant keywords.?
The JOB statement is the first in a JCL stream Its format is // jobname, keyword JOB, accounting information in brackets and keywords, MSGCLASS, MSGLEVEL, NOTIFIY, CLASS, etc.

How do you access a file that had a disposition of KEEP?
Need to supply volume serial no. VOL=SER=xxxx.

What are SD37, SB37, SE37 abends?
All indicate dataset out of space. SD37 – no secondary allocation was specified. SB37 – end of vol. and no further volumes specified. SE37 – Max. of 16 extents already allocated.

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,
To run a DB2 program,
PLAN(…..) LIB(….) PARMS(…)

Describe the EXEC statement, its meaning, syntax, and keywords.?
The EXEC statement identifies the program to be executed via a PGM=program name keyword Its format is //jobname EXEC PGM=program name The PARM= keyword can be used to pass external values to the executing program.

What does a disposition of (MOD, DELETE, DELETE) mean?
The MOD will cause the dataset to be created (if it does not exist), and then the two DELETEs will cause the dataset to be deleted whether the step abends or not. This disposition is used to clear out a dataset at the beginning of a job.

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.

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.

Describe the DD statement, its meaning, syntax, and keywords.?
The DD statement links the external Data Set name (DSN) to the DDNAME coded within the executing program It links the File names within the program code to the File names know to the MVS operating system The syntax is // ddname DD DSN=Data Set name Other keywords after DSN are DISP, DCB, SPACE, etc .

What is the DD statement for an output file?
Unless allocated earlier, will have the full parameters: DISP=(NEW, CATLG, DELETE), UNIT, SPACE & DCB.

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.

What is the order of searching for the libraries in a JCL?
First any private libraries as specified in the STEPLIB or JOBLIB, then the system libraries such as SYS1.LINKLIB. The system libraries are specified in the link list.

What is PROC? What is the difference between instream and a cataloged PROC?
PROC stands for procedure It is ‘canned’ JCL invoked by a PROC statement An instream PROC is presented within the JCL; a cataloged PROC is referenced from a proclib partitioned Data Set.

What do you do if you do not want to keep all the space allocated to a dataset?
Specify the parameter RLSE ( release ) in the SPACE e.g. SPACE=(CYL,(50,50),RLSE)

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.

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

What is the difference between a symbolic and an override in executing a PROC?
A symbol is a PROC placeholder; the value for the symbolic is supplied when the PROC is invoked, eg &symbol=value An override replaces the PROC’s statement with another one; it substitutes for the entire statement

This is a new file and creates it, if the step terminates normally, pass it to the subsequent steps and if step abends, delete it. This dataset will not exist beyond the JCL.

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

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

What is RESTART? How is it invoked?
A RESTART is a JOB statement keyword It is used to restart the job at a specified s step rather than at the beginning

How do you create a temporary dataset? Where will you use them?
Temporary datasets can be created either by not specifying any DSNAME or by specifying the temporary file indicator as in DSN=&&TEMP.
We use them to carry the output of one step to another step in the same job. The dataset will not be retained once the job completes.

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

How to change default proclib?

What is GDG? How is it referenced? How is it defined? What is MODELDSCB? GDG stands for generation data group It is a Data Set with versions that can be referenced absolutely or relatively It is defined by an IDCAMS define generation data group execution.

How do you restart a proc from a particular step?
In job card, specify RESTART=procstep.stepname
where the procstep = name of the JCL step that invoked the proc
and stepname = name of the proc step where you want execution to start

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

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.

How do you skip a particular step in a proc/JOB?
Can use either condition codes or use the JCL control statement IF (only in ESA JCL)

What does IEBGENER do?
Used to copy one QSAM file to another. Source dataset should be described using SYSUT1 ddname. Destination dataset should be described using SYSUT2. IEBGENR can also do some reformatting of data by supplying control cards via SYSIN.

What are the valid DSORG values?
PS – QSAM, PO – Partitioned, IS – ISAM

What is a primary allocation for a dataset?
The space allocated when the dataset is first created.

A PROC has five steps. Step 3 has a condition code. How can you override/nullify this condition code?
Provide the override on the EXEC stmt in the JCL as follows:
//STEP001 EXEC procname,COND.stepname=value
All parameters on an EXEC stmt in the proc such as COND, PARM has to be overridden like this.

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.

What are the differences between JES2 & JES3?
JES3 allocates datasets for all the steps before the job is scheduled. In JES2, allocation of datasets required by a step is done only just before the step executes.

Post Top Ad

Your Ad Spot