Showing posts with label VSAM Questions. Show all posts
Showing posts with label VSAM Questions. Show all posts

Wednesday, 28 January 2015

Latest VSAM Part6 Interview Questions and Answers

51. What is the COBOL RECORD KEY clause?
The RECOED KEY in the SELECT clause identifies the files primary key as it will be known to the program.

52. In the COBOL SELECT statement what is the ORGANIZATION for a KSDS?
the ORGANIZATION is INDEXED.

53. What is the base cluster?
The base cluster consists of the data component and the index component for the primary index of a KSDS.

54. What is free space?
Free space is reserved within the data component of a KSDS to accommodate inserting new records.

55. What is a path?
A path is a file that allows you to access a file by alternate index - the path provides an association between the AIX and the base cluster.

56. What is a CI, control interval?
A control interval is the unit of information that VSAM transfers between virtual and auxilliary storage.

57. What is a CA, control area?
A group of control intervals makes up a control area.

58. What is the index set?
This is the other part of the index. It has multiple levels with pointers that ultimately reach to the sequence set.

59. What is the catalog?
The catalog contains the name of all datasets. VSAM and non-VSAM. It is used to access these datasets.

60. What is the purpose of the FILE STATUS clause in the SELECT statement?
The FILE STATUS field identifies the field that VSAM uses to provide information about each I/O operation for the file.

Part1  Part2  Part3  Part4  Part5  Part6  Part7

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