VSAM Realtime Interview Questions and Answers

9/27/2009 No Comment

IBM VSAM Realtime Interview Questions and Answers.

What  will happen when you try to open an empty VSAM file in a COBOL program for input?
Answer : A VSAM file that has never contained a record is treated as unavailable. Attempting to open for input will fail. An empty file can be opened for output only. When you open for output, COBOL will write a dummy record to the file & then delete it out.

Explain how can you initialize a VSAM file before any operation?
Answer : You can write a dummy program that will just open the file for output and thereafter closes it.

Can you tell me what does a file status of 02 on a VSAM signifies?
Answer : It indicates duplicate alternate key. It happens on both input and output operation.

How can you load a VSAM data set with records ?
Answer : For loading we can use the REPRO command.

Differentiate between Sequential files and ESDS files in VSAM?

Answer : In VSAM, Sequential(QSAM) files can be created on tape while ESDS files cannot be created. Again, you can have ALTINDEX for an ESDS while no such facility that exists for QSAM files.

Explain how do you define a GDG in VSAM?

Answer : We can use the DEFINE GENERATIONDATAGROUP command. In the same IDCAMS step, another dataset must be defined whose DCB parameters are used when new generations of the GDG are created. This dataset is known as the model dataset. The ds name of this model dataset must be the same as that of the GDG, so use a disp of keep rather than catlg and also specify space=(trk,0)

Is it necessary that all versions of the GDG have to be of the same record length ?

Answer : It is not required, the DCB of the model dataset can be overridden when you allocate new versions.

Explain in brief how are different versions of GDG named ?

Answer : base-file-name.GnnnnnV00 where nnnn= generation number (upto 255).
nnnn will be 0000 for the 1st generation.


What are the additional information you should give in the DD statement while defining the next generation of a GDG?

Answer : Give (+1) as the generation number, give (new,catlg) for disp, give space parameter, can give the dcb parameter if you want to override the dcb of the model dataset.

When the DEFINE JCL is not available, how can you get information about a VSAM file’s organisation ?

Answer : You can use the LISTCAT command.

What are the different types of VSAM Datasets?

Answer : 
  • Entry sequenced Datasets (ESDS), 
  • Key sequenced Datasets (KSDS) and relative record
  • Dataset (RRDS), LDS (linear Data Set).
Can you tell me how are records stored in an ESDS, entry sequenced Dataset?
Answer : They are stored without respect to the contents of the records and in the order in which they are included in the file.

Explain in brief why do VSAM take more disk space than other utilities?

Answer : VSAM increases the disk space requirements of systems. This is because VSAM offers certain capabilities like partial self-reorganization to make things more efficient in data sets that can be modified.

Can you specify some the distinctive features of a KSDS, Key Sequenced Dataset?

The index and the distributed free space. CI and CA splits upon updates. Record length may be changed during the time of update. The records are accessed by a particular Key in KSDS.
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