VSAM Questions
VSAM Questions
Entry sequenced datasets (ESDS), key sequenced datasets (KSDS) and relative record dataset (RRDS)
They are stored without respect to the contents of the records and in the order in which they are
included in the file.
A control interval is the unit of information that VSAM transfers between virtual and auxiliary
storage.
This is the part of the index that points to the CA and CI of the record being accessed.
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.
The catalog contains the names of all datasets, VSAM and non-VSAM. It is used to access these
datasets.
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.
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.
Free space is reserved within the data component of a KSDS to accommodate inserting new records.
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.
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?
18. In the COBOL SELECT statement for a KSDS what are the three possibilities for ACCESS?
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?
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.
It's rarely used. It means one program uses both sequential and random processing for a VSAM KSDS
file.
They are end of file (10), duplicate key (22), record not found (23), VSAM logic error (90), open
problem (92) and space problem (93).
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.
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.
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?
It specifies how the file may be shared between jobs and between batch and CICS environments.
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.
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.
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.
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.
IDCAMS is an access method services utility used for creating, deleting,altering VSAM files and
copying sequential file to a VSAM file, etc.
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?
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.
FREE SPACE(FPSC)
49. What's the device independent method to indicate where a Record is Stored?
122 TIMES