VSAM Interview Questions and Answers

10/07/2009 1 Comment

Mainframe VSAM Interview Questions and Answers.

Explain what do you mean by a upgrade set in VSAM?
Answer : The upgrade set is the list of all AIXs that VSAM must be maintaining for a specific base cluster, so that when data in the base cluster is modified or updated, the AIX files are also updated.

Explain what is a base cluster in VSAM?

Answer : The base cluster in VSAM consists of the data component as well as the index component that is required for the primary index of a KSDS.

In a COBOL SELECT statement, can you tell what is the ORGANIZATION for a KSDS?
Answer : For a KSDS, the ORGANIZATION is INDEXED.

In a COBOL SELECT statement for a KSDS can you tell me what are the 3 possibilities for ACCESS?
Answer : The three possibilities for ACCESS can be RANDOM, SEQUENTIAL or DYNAMIC.

What will happen if there is no secondary allocation made for Datasets?
Answer : VSAM will inform COBOL program of the problem and terminate the processing of the program.

What do you mean by IDCAMS? Explain its purpose?
Answer : IDCAMS, also known as Access Method Services, is used to perform the following tasks cited below.
  • Createing a VSAM data set, VSAM alternate index, or catalog.
  • Conversion of non-VSAM to VSAM data set.
  • Listing a catalog entry for a data set, Dataset/catalog contents.
  • Copy a Dataset or catalog.
  • Loading of a VSAM Dataset from VSAM records
  • Renaming of VSAM data sets.
Why CI and CA splits are not possible in ESDS and RRDS?
Answer : In ESDS the new record is added at the end of last record. And no embedded free space is allocated at the time of Dataset definition. In the case of RRDS the slots for the records are pre-allocated and so the CI and CA split is not possible.

Is it required that primary Key values have to be unique? Do alternate Key values have to be Unique?
Answer : Primary Key values must always be unique however alternate Key values need not be unique all the time.

What do you mean by the COBOL RECORD KEY clause in VSAM?
Answer : The RECORD KEY in the SELECT clause identifies the files Primary Key as it will be made available to the program.

What is the use of the FILE STATUS clause in the SELECT statement in VSAM?
Answer : The FILE STATUS field is used to identify the field that VSAM uses to provide information about each I/O Operation for the file.

To use the REWRITE command, how should the VSAM file be opened?
Answer : It should be opened Input/Output mode.

What do you mean by a VSAM split?
Answer : If there is a memory crunch and there is not enough space in the Control Interval, VSAM performs a Control Interval split by moving some records to the free Control Intervals. If there isn't a free Control Interval,then VSAM performs a control area split by allocating a new control area and moving half of the Control Intervals to it.

Explain the meaning and syntax for the START command?

Answer : In VSAM, the START command is used to read other than the next VSAM record. For this, A value must be moved into the RECORD KEY. However, the KEY clause is optional, but it can be used to specify a relational operator.

Explain what is the meaning of dynamic processing in VSAM?

Answer : Dynamic processing means one program uses both sequential and random processing for a VSAM KSDS file. It is however rarely used in VSAM.

Can you name some common VSAM error conditions and codes?

Answer : They are end of file (10), duplicate Key (22), record not found (23), Out of space condition is raised (28) ,VSAM logic error (90), open problem (92) and space problem (93).

bIt is a COBOL II enhancement to VSAM batch processing expanding the FILE STATUS field. It is defined in WORKING - STORAGE as a six byte group item with three two byte elements, the normal return code, the function code and the feedback code.

What do you mean by a VSAM slot?

Answer : VSAM slot is a relative record Dataset (RRDS) consists of a specified number of areas called slots. Each slot is identified by a relative record number (RRN) which indicates its relative position in the file.

Name the utility program closely associated with VSAM?

IDCAMS is the utility, the access method services utility.

There are seven IDCAMS commands in VSAM. Can you name and explain each of them?

  • ALTER is used for modification of information for a catalog, alternate index, cluster or path.
  • BLDINDEX is used to build the alternate index.
  • DEFINE is used for ALTERNATEINDEX, CLUSTER or PATH.
  • DELETE is used to remove the catalog entry for a catalog, cluster, alternate index or path.
  • LISTCAT  is for listing Information about the Dataset.
  • PRINT is used to print the Dataset contents.
  • REPRO is used to copy records from one file to another.
Can you tell me what are the three levels of definition for the VSAM DEFINE?
Answer : They are INDEX, DEFINE CLUSTER and DATA.

Explain what is the significance of the SHAREOPTIONS parameter?

Answer : SHAREOPTIONS parameter specifies how the file may be shared between jobs and between batch and CICS Environments.

What do you mean by DEFINE MODEL parameter? 

Answer : DEFINE MODEL parameter specifies whether the MODEL parameter allows you to model your cluster by modelling it after an existing cluster.

Can you tell me how do you fix the problem associated with VSAM out of space condition?

Answer : We can fix it by the following.
  • By defining new VSAM Dataset allocated with more space.
  • By using IDCAMS to REPRO the old VSAM file to new VSAM Dataset.
  • By using IDCAMS to ALTER / rename the old VSAM Dataset or set IDCAMS to DELETE the old VSAM Dataset.
  • By using IDCAMS to ALTER / rename the new VSAM Dataset to the name of the original VSAM Dataset.
Explain how many ways you can load data in a VSAM cluster?
Answer : There are two ways to achieve that.
Firstly by using the REPRO command and secondly by using COBOL program.
Related Posts


1 comment :

  1. Interview questions are very helpful.
    Mainframe important concepts and programs are explained in the IIWOWIIS channel in youtube. Please support us and share your comments.

    Thanks http://www.aired.in for the support

    ReplyDelete

 

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