JCL Data Definition Interview Questions and Answers

8/17/2009 No Comment

JCL Data Definition Interview Questions and Answers.

What is the purpose of the Data Definition (DD) Statement?
Answer : Data Definition statements describe each dataset (a file on a direct-access storage device, tape or printed output) and request the allocation of I/O devices.

Describe what the DISP parameter does?
Answer : The DISP parameter describes the current status of the dataset and directs the system
on the disposition of the dataset either at the end of the job or when the step abnormally terminates . DISP always required unless the dataset is created and deleted in the same step

How many subparameters does the DISP parameter consist of and what is the meaning of each?

Answer : The DISP parameter consists of three sub parameters: start-status, end-status-normal and end-status-abend. Start-status indicates the status of a dataset at the beginning of the job step. End-status-normal tells MVS what needs to be done with the dataset when the job step ends. End-status-abend indicates the desired disposition of the dataset if the job step abend. It is also known as the conditional disposition.

What are the meanings of the parameters used (within) the DISP parameter at the beginning of the job step?

Answer : The status NEW, MOD, OLD, or SHR is the status of the dataset at the beginning of the step. If the dataset is NEW, the system creates a dataset label; if it is OLD, the system locates the dataset. The system gives a program exclusive control of a database except when SHR is used.

What are the normal “disposition” of the DISP parameter?

Answer : The normal disposition indicates the disposition of the dataset when the dataset is closed or when the job terminates normally. Normal dispositions are KEEP, DELETE, PASS, CATLG, and UNCATLG.

What is the abnormal “disposition” of the DISP parameter?

Answer : The abnormal disposition would be effected only if the step abnormally terminates. They are the same normal disposition as except that PASS is not allowed KEEP, CATLG, UNCATLG and DELETE are all permitted.

When should DISP=SHR be used?

Answer : DISP=SHR must be used only when it is necessary to share the dataset.
SHR should b used for input dataset.

When should DISP=MOD be used?

Answer : DISP=MOD is used to either to extend an existing sequential dataset or to create a dataset if it does not exist. If the dataset exists the records are appended at the end of the existing dataset. If the dataset does not exist the system treats mod as if it were NEW, provided that the volume parameter has not been used. If the volume parameter is used, the system terminates the job and does not create the new dataset. MOD can be used to add to the dataset that extends to several volumes. Always specify a disposition of CTLG with the MOD for cataloged dataset, even if they are already cataloged, so that any additional volume serial number will be recorded in the catalog.

When should DISP = OLD be used?
Answer : DISP = OLD should be used for an existing dataset. It can be used with an input dataset to read or an output dataset to rewrite. The step which uses DISP=OLD will have exclusive control of the dataset. If an OLD dataset is cataloged, the DSN parameter is usually the only other parameter needed. If an LD dataset is not cataloged, UNIT and VOL parameter are required.

When should DISP = NEW be used?

Answer : DISP=NEW should be used when it is desired to create a dew dataset. The UNIT parameter is usually required for dataset on direct access volumes.

How is a dataset passed from one step to another?

Answer : A dataset is passed from one step to another based on what is coded on the DISP parameter. The dataset can only be passed to subsequent steps if PASS is used on the disposition parameter.

If a dataset is passed and the subsequent steps do not use it, what happen to the dataset at the end of the job?

Answer : If a dataset is passed to subsequent steps and it is not used, at the end of the job the dataset is deleted, since DELETE is assumed for all NEW datasets, temporary or non temporary.

What is the default for the disposition parameter if it’s not coded on the DD statement for a dataset?

Answer : The default disposition used on a dataset, which was coded without a disposition parameter, is NEW. The disposition of NEW implies exclusive control of the dataset.

How are dataset concatenated?
Answer : Datasets are concatenated by writing a normal DD statement for the first dataset and the adding a DD statement without a DDNAME for each dataset to be concatenated in the order they are to be read. The following is an example of three datasets concatenated:
//INSMP DD DSN=JAN.DATA, DISP=SHR
// DD DSN=FEB.DATA, DISP=SHR
// DD DSN=MAR.DATA, DISP=SHR

Can datasets of a different record length (LRECL) be concatenated?

Answer : Datasets with different LRECLs can be concatenated as long as the dataset with the largest block size appears first.

Can Partitioned Datasets (PDSs) be concatenated?

Answer : Partitioned Datasets can be concatenated. This is often done for program libraries so that the system can search several libraries fro a member.

What is a Data Control Block (DCB)?

Answer : The Data Control Block is a table of data, in storage, that describes each dataset used by the program.

What are two different places from which DCB information can be obtained and in what order?

Answer : Data information can be obtained from three places in the following order:
  • The data control block, from application program, is used first.
  • Information supplied on the DD statement is used second.
  • Dataset label information for the DCB is used third.
What is the purpose of using a dataset referback?
Answer : A dataset referback is used to copy a dataset name from a prior job step.

What are the disadvantages of using a dataset referback?
Answer : The disadvantages of using dataset refer back is that they tend to make JCL more difficult to maintain because close attention, scrutiny and manual examination of preceding steps is needed to understand what a given job-stream is doing. They also complicate the restart of a job if a failure or interruption occurs.

Under which circumstances is the disposition parameter not performed?

Answer : Disposition is not performed under the following circumstances:
The step does not start because of JCL errors.
The step is bypassed because of the COND parameter in the JOB or EXEC statement
The step abnormally terminates because it could not find enough space to satisfy the request.
DUMMY or DSN=NULLFILE is coded on the DD statement.
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