Wednesday 28 January 2015

VSAM Part3 Interview Questions and Answers

21. How do you fix the problem associated with VSAM out of space condition?
Define new VSAM dataset allocated with more space.
Use IDCAMS to REPRO the old VSAM file to new VSAM dataset.
Use IDCAMS to ALTER / rename the old VSAM dataset or se IDCAMS to DELETE the old VSAM datset.
Use IDCAMS to ALTER / rename the new VSAM dataset to the name of the original VSAM dataset.

22. During processing of a VSAM file, some system error occurs and it is subsequently unusable What do you do?
Run VERIFY.

23. Suppose a generation of GDG gets created in a particular step of a proc. How would you refer the current generation in a subsequent step? What would be the disposition of this generation now?
Relative generation numbers are updated only at the end of the job, not at the end of a step. To allocate a new generation, we would be using (+1) with a DISP of ( NEW, CATLG, DELETE ). To refer to this in a subsequent step in the same job, we would again use (+1) but with a DISP of SHR or OLD.

24. How are different versions of GDG named?
base-file-name. GnnnnnnV00 where nnnn=generation number (upto 255). nnnn will be 0000 for the 1st generation.

25. How do you define a GDG?
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)

26. What is the difference between sequential files and ESDS files?
Sequential (QSAM) files can be created on tape while ESDS files cannot. Also, you can have ALTINDEX for an ESDS while no such facility exists for QSAM files.

27. How do you calculate record size of an alternate cluster? Give your values for both unique and nonunique?
UniqueCase: 5 + (alt-key-length + primary - key )
Non unique Case: 5 + (alt-key-length + n * primary - key ) where n = number of duplicate records for the alternate key

28. How do you load a VSAM data set with records?
Using the REPRO command.

29. Do all versions of the GDG have to be of the same record length?
No, the DCB of the model dataset can be overridden when you allocate new versions.

30. Suppose 3 generations of a GDG exist. How would you reference the 1st generation in the JCL?
Use GDG name(-2).

Part1  Part2  Part3  Part4  Part5  Part6  Part7

No comments:

Post a Comment