VSAM Interview Questions, FAQs and Answers

11/10/2009 No Comment

IBM Mainframe VSAM Interview Questions.

Collection of VSAM Interview Questions.

What do you mean by the REPRO command?
Answer : Whenever a new cluster is created using IDCAMS, the cluster will be empty. By the use of REPRO command, we are able to load records into the cluster. REPRO is used to:
  • Copy Datasets (VSAM or NON-VSAM), copy catalogs.
  • Conversion of sequential and index sequential Datasets to VSAM format.
  • Backup VSAM catalog
  • Conversion of VSAM and Index sequential Datasets to sequential format
  • Read a backup copy of VSAM catalogs.
What do you mean by RECOVERY and SPEED parameters in DEFINE CLUSTER command?
Answer : The parameters RECOVERY (default) and SPEED are mutually exclusive. Recovery is used to pre-format the control areas during the initial DataSet load, if the job fails, you can restart but you must have a recovery routine already written to restart the job. SPEED does not pre-format the CAs. It is advisable that you specify SPEED to speed up your initial data load.

Is it slower if you access a record through ALTERNATIVE INDEX as compared to Primary INDEX?

Answer : Yes it slower because the alternate Key would first locate the primary Key, which in turn locates the actual record. It requires twice the number of I/Os.

What do you mean by a SHAREOPTIONS parameter (SHR) in Define Cluster command?
Answer : It is used to define the cross-region and cross-system sharing capabilities of the DataSet. Syntax is SHR (CRvalue CSvalue)
  • 1 means multiple read OR single write (read integrity)
  • 2 means multiple read AND single write (Write integrity)
  • 3 means Multiple read AND multiple write
  • 4 is same as 3, which refreshes the buffer with every random access. Default is SHR (1 3).
Explain what are the optional parameters to the input DataSet while loading the empty cluster with the data records?
Answer : 
i) Skip and Count
In this case, the first two records are skipped and the next four records are printed. The
default for SKIP is 0, and for COUNT will be printing records from beginning to end.

ii) FromKey and ToKey
FROMKEY (111111) -
TOKEY (444444)
Will print all records with Key value ranging from 111111 to 444444.


Is DELETE operation supported in an ESDS? Is rewrite operation possible in ESDS ?
Answer : The delete operation is not supported. Delete operation is not possible in VSAM ESDS. Yes, rewrite operation is possible in an ESDS.

Can you delete VSAM files with the DELETE option of the DISPOSITION parameter of JCL?

Answer : We cannot delete, you have to give a separate DELETE command in the VSAM cluster.

What do you mean by GDG in VSAM?

Answer : GDG means Generation Data Group.

Can you tell me what are the codes returned by the AMS (Access Method Services) command during the execution in VSAM?
Answer : Every AMS command issues a condition code. If multiple commands are being executed successively, there might be a requirement to execute or bypass certain commands on the Success or failure of a previous command.
The normal condition codes returned by AMS commands are :
0 - The function was executed successfully
4 - A problem was encountered while executing the function, WARNING
8 - The requested function was executed, but major specifies were unavoidably bypassed,
12 - The requested command could not be performed because of a logical error, SEVERE
16 - A severe error occurred causing the remainder of the command stream to be
bypassed., FATAL.

Explain in brief how you can create a VSAM file ?

Answer : You use the IDCAMS utility with the DEFINE CLUSTER option.

How can you copy to a VSAM cluster ?
Answer : With the help of the IDCAMS utility with the REPRO option.

Can you tell me how many buffers are allocated to VSAM KSDS and ESDS?

Answer : There are 2 data buffers by default for ESDS. For KSDS it allots 2 data buffers and 1 index buffers. Each buffer is about 4k.

Explain in brief what are the 3 types of VSAM files ?
Answer : Below are the 3 types of VSAM files.
  • ESDS (Entry sequenced dataset). DB2 uses a special type of ESDS.
  • RRDS (Relative record dataset). Records are accessed using a relative number.
  • KSDS (Key sequenced dataset) is the most common type encountered. The record sequence is determined by a unique key field.
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