0% found this document useful (0 votes)
22 views6 pages

VSAM Questions

Vsam related top question

Uploaded by

kdarshanakamalam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views6 pages

VSAM Questions

Vsam related top question

Uploaded by

kdarshanakamalam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

1. What are the types of VSAM datasets?

Entry sequenced datasets (ESDS), key sequenced datasets (KSDS) and relative record dataset (RRDS)

2. How are records stored in an ESDS, entry sequenced dataset?

They are stored without respect to the contents of the records and in the order in which they are
included in the file.

3. What is a CI, control interval?

A control interval is the unit of information that VSAM transfers between virtual and auxiliary
storage.

4. What are the distinctive features of a ksds, key sequenced dataset?

The index and the distributed free space.

5. What is a CA, control area?

A group of control intervals makes up a control area.

6. What is a sequence set?

This is the part of the index that points to the CA and CI of the record being accessed.

7. 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.

8. What is a cluster?

A cluster is the combination of the index, sequence set and data portions of the dataset. The
operating system gives program access to the cluster, ie. to all parts of the dataset simultaneously.

9. What is the catalog?

The catalog contains the names of all datasets, VSAM and non-VSAM. It is used to access these
datasets.

10. What is an alternate index?


An AIX is a file that allows access to a VSAM dataset by a key other than the primary one.

11. 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.

12. What is the upgrade set?

The upgrade set is the list of all AIXes that VSAM must maintain for a specific base cluster, so that
when data in the base cluster is updated, the AIX files are also updated.

13. What is free space?

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

14. What is a VSAM split?

If there isn't 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 VSAM performs a
control area split by allocating a new control area and moving half of the control intervals to it.

15. What is the base cluster?

The base cluster consists of the data component and the index component for the primary index of a
KSDS.

16. Do primary key values have to be unique? Do alternate key values have to be unique?

Primary key values must be unique; alternate key values need not be.

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

The ORGANIZATION is INDEXED.

18. In the COBOL SELECT statement for a KSDS what are the three possibilities for ACCESS?

ACCESS can be SEQUENTIAL, RANDOM or DYNAMIC.

19. What is the COBOL RECORD KEY clause?


The RECORD KEY in the SELECT clause identifies the files primary key as it will be known to the
program.

20. 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.

21. If you wish to use the REWRITE command haw must the VSAM file be opened?

It must be opened as I/O.

22. Explain the meaning and syntax for the START command.

The START command is used read other than the next VSAM record. A value must be moved into the
RECORD KEY. The KEY clause is optional, but it can be used to specify a relational (equal, less than,
etc.) operator.

23. What is the meaning of dynamic processing?

It's rarely used. It means one program uses both sequential and random processing for a VSAM KSDS
file.

24. Name some common VSAM error conditions and codes.

They are end of file (10), duplicate key (22), record not found (23), VSAM logic error (90), open
problem (92) and space problem (93).

25. What is the VSAM-code field?

It 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.

26. What is a VSAM slot?

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.

27. What is the utility program closely associated with VSAM?


IDCAMS, the access method services utility.

28. There are at least seven IDCAMS commands; name and explain each of them.

ALTER modifies information for a catalog, alternate index, cluster or path. BLDINDEX builds the
alternate index, ofcourse. DEFINE is used for ALTERNATEINDEX, CLUSTER or PATH. DELETE removes
the catalog entry for a catalog, cluster, alternate index or path. LISTCAT lists information about the
dataset. PRINT prints the dataset contents. REPRO copies records from one file to another.

29. What are the three levels of definition for the VSAM DEFINE?

They are DEFINE CLUSTER, DATA and INDEX.

30. What is the significance of the SHAREOPTIONS parameter?

It specifies how the file may be shared between jobs and between batch and CICS environments.

31. What is the meaning of the DEFINE MODEL parameter?

It specifies whether Daniela Pestova or Yamila - oops! Wrong models! The MODEL parameter allows
you to model your cluster by modelling it after an existing cluster.

32. How do you fix the problem associated with VSAM out of space condition?

1. Define new VSAM dataset allocated with more space. 2. Use IDCAMS to REPRO the old VSAM file
to new VSAM dataset. 3. Use IDCAMS to ALTER / rename the old VSAM dataset or se IDCAMS to
DELETE the old VSAM dataset. 4. Use IDCAMS to ALTER / rename the new VSAM dataset to the
name of the original VSAM dataset.

33. What is the meaning of VSAM RETURN-CODE 28?

Out of space condition is raised.

34. Correction to the previous question - Yor can have ALT INDEX only onKSDS and ESDS - not RRDS.

See the question for correction - you cannot have ALT INDEX for RRDS.

35. How amny Alternate Indexes you can have on a dataset? - Remember ALT INDEX is possibleonly
on KSDS and RRDS.

255 - but you must be a not to have so many ALT Indexes on a dataset!
36. Is it slower if you access a record through ALT INDEX as compared to Primary INDEX?

Yes. Why? Because the alternate key would first locate the primary key, which in turn locates the
actual record. Needs twice the number of I/Os.

37. What is RECOVERY and SPEED parameters in DEFINE CLUSTER command?

RECOVERY (default) and SPEED are mutulally exclusive. Recovery preformats 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 preformat the CAs. It is recommended that you
specify SPEED to speed up your initial data load.

38. Describe SHAREOPTIONS parameter (SHR) in Define Cluster command.

It defines the cross-region and cross-system sharing capabilities of the dataset. Syntax is
SHR(CRvalue CSvalue) value 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).

39. What does the KEYRANGES parmater in Define Cluster commend do?

It divides a large dataset into several volumes accoring to the Keyranges specified. e.g., KEYRANGES
((0000001 2999999) (3000000 5999999)). if the activity on the key ranges are evenly distributed,
cuncurrent access is possible, which is aperformance improvement.

40. What is GDG means in VSAM?

Generation Data Group

41. What is IDCAMS? and what is the purpose of it?

IDCAMS is an access method services utility used for creating, deleting,altering VSAM files and
copying sequential file to a VSAM file, etc.

42. How to delete a member using JCL.

Using IDCAMS a member can be deleted. DELETE 'XXX.YYY(member)

43. What is the Difference between LDS & ESDS ?

These two datesets are VSAM datasets. ESDS maintains control information.But LDS does not
maintains the control information.
44. Is a delete operation possible in an ESDS?

No delete operation is not possible in VSAM ESDS.

45. Is rewrite operation possible in ESDS?

Yes rewrite operation is possible in an ESDS.

46. What is an alternet index and path?

An alternet index is an another way of accessing key sequenced data record stored in a base cluster
and path is the linkage which connect alternet index to its base cluster.

47. How many buffers are alloted to VSAM KSDS and ESDS?

Data buffers by default for ESDS.for KSDS it allots 2 data buffers and 1 index buffers. each buffer is
about 4k.

48. What's the biggest disadvantage of using a VSAM dataset?

FREE SPACE(FPSC)

49. What's the device independent method to indicate where a Record is Stored?

By USING RBA(Relative Byte Address).

50. How many times secondary space allocated?

122 TIMES

You might also like