0% found this document useful (0 votes)
371 views21 pages

VSAM

VSAM is IBM's Virtual Storage Access Method used for accessing mainframe data. The document lists over 50 questions about VSAM including questions about the different types of VSAM files (ESDS, KSDS, RRDS), IDCAMS commands, defining and using VSAM files, alternate indexes, loading and initializing VSAM files, error handling, and more. The questions cover topics needed to effectively prepare for a VSAM interview.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
371 views21 pages

VSAM

VSAM is IBM's Virtual Storage Access Method used for accessing mainframe data. The document lists over 50 questions about VSAM including questions about the different types of VSAM files (ESDS, KSDS, RRDS), IDCAMS commands, defining and using VSAM files, alternate indexes, loading and initializing VSAM files, error handling, and more. The questions cover topics needed to effectively prepare for a VSAM interview.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 21

Tags: VSAM Realtime Interview Questions,Mainframe VSAM Interview

Questions,VSAM Questions
What is a sequence set?
What is the index set?
Suppose 3 generations of a GDG exist. How would you reference the 1st
generation in
the JCL ?
What is an alternate index and path ?
How many buffers are allotted to VSAM KSDS and ESDS ?
What is the biggest disadvantage of using a VSAM dataset ?
What is free space?
What is a VSAM split?
What is the base cluster?
Do primary key values have to be unique? Do alternate key values have to
be unique?
In the COBOL SELECT statement what is the ORGANIZATION for a KSDS?
In the COBOL SELECT statement for a KSDS what are the three
possibilities for ACCESS?
What is the COBOL RECORD KEY clause?
What is the purpose of the FILE STATUS clause in the SELECT statement?
If you wish to use the REWRITE command haw must the VSAM file be
opened?
Explain the meaning and syntax for the START command.
What is the meaning of dynamic processing
Name some common VSAM error conditions and codes.

What is the VSAM-code field ?


What is a VSAM slot ?
What is the utility program closely associated with VSAM?
There are at least seven IDCAMS commands; name and explain each of
them?
What are the three levels of definition for the VSAM DEFINE?
What is the significance of the SHAREOPTIONS parameter?
What is the meaning of the DEFINE MODEL parameter?
What is File Status in VSAM ?
What is a LDS (Linear Data Set ) and what is it used for ?
What is IDCAMS ?
Can AMS commands be run from the TSO prompt ?
Syntax of AMS modal commands ?
Under IDCAMS, multiple functions can be executed, each of which returns
a condition code. What will be the condition code returned to the
operating system ?
What is Control Interval, Control Area ?
What is FREESPACE ?
Mainframe Virtual Storage Access Method Interview Questions collected
form various MNCs
How do you decide on optimum values for CI, FREESPACE etc.?
Would you specify FREESPACE CE for an ESDS ?
What is SHAREOPTS ?
What is the meaning of each of the values in SHAREOPTS (2 3) ?

How do you define a kSDS ?


How do you define an ALTINDX ? How do you use ALTINDXs in batch, CICS
program's ?
Using Alternate Indexes in Batch program:
Using Alternate Indexes in CICS program:
What happens when you open an empty VSAM file in a COBOL program for
input ?
How do you initialize a VSAM file before any operation ? a VSAM with
alternate index ?
What does a file status of 02 on a VSAM indicate ?
How do you calculate record size of an alternate cluster ? Give your values
for both unique and nonunique.
What is the difference between sequential files and ESDS files ?
Suppose 3 generations of a GDG exist. How would you reference the 1st
generation in the JCL ?
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 ?
What more info you should give in the DD statement while defining the
next generation of a GDG ?
Assuming that the DEFINE JCL is not available, how do you get info about a
VSAM file's organisation ?
During processing of a VSAM file, some system error occurs and it is
subsequently unusable What do you do ?
How do you fix the problem associated with VSAM out of space condition ?
What is the meaning of VSAM RETURN-CODE 28 ?

On which dataset You can have ALT INDEX ?


What is an alternate index and path ?
How do you load a VSAM data set with records ?
How do you define a GDG ?
Do all versions of the GDG have to be of the same record length ?
How are different versions of GDG named ?
How many buffers are allotted to VSAM KSDS and ESDS ?
What is the biggest disadvantage of using a VSAM dataset ?
What are the types of VSAM datasets ?
How are records stored in an ESDS, entry sequenced dataset?
What is a CI, control interval?
What are the distinctive features of a KSDA, key sequenced dataset?
What is a CA, control area?
How many ALternate Indexes you can have on a dataset ?
Is it slower if you access a record through ALT INDEX as compared to
Primary INDEX ?
What does the KEYRANGES parameter in Define Cluster commends do ?
VSAM Interview prepared by Experts.The question set will help a jobseeker to prepare for VSAM Interview
What are the optional parameters to the input dataset While loading the
empty cluster with the data records ?
What is IDCAMS ? and what is the purpose of it ?
How to delete a member using JCL.
Is it slower if you access a record through ALT INDEX as compared to

Primary INDEX ?
What is RECOVERY and SPEED parameters in DEFINE CLUSTER command ?
What is the difference between LDS and ESDS ?
Is a delete operation possible in an ESDS ? B, is rewrite operation possible
in ESDS ?
What is the device independent method to indicate where a Record is
Stored ?
How many times secondary space allocated ?
What is the RRN for the first record in RRDS ?
What is a Base Cluster ?
If FSPC(100 100) is specified does it mean that both the control interval
and control area will be left empty because 100 % of both CI and CA are
specified
to be empty ?
What is a sequence set?
What is a VSAM split?
What is the base cluster?
What is IDCAMS ?
Can AMS commands be run from the TSO prompt ?
Syntax of AMS modal commands ?
How do you decide on optimum values for CI, FREESPACE etc ... ?
Would you specify FREESPACE CE for an ESDS ?
What is SHAREOPTS ?
Name some common VSAM error conditions and codes.

What is the VSAM-code field ?


In vsam why we use export-import utility?
What is a cluster?
What is the catalog?
What is an alternate index?
What is a path?
What is the upgrade set?
What is a VSAM slot ?
Do all versions of the GDG have to be of the same record length ?
How are different versions of GDG named ?
What more info you should give in the DD statement while defining the
next generation of a GDG ?
Assuming that the DEFINE JCL is not available, how do you get info about a
VSAM file's organisation ?
Describe SHAREOPTIONS parameter (SHR) in Define Cluster command.
What does the KEYRANGES parameter in Define Cluster commends do ?
What is the index set?
What is the meaning of dynamic processing
What is the COBOL RECORD KEY clause?
What are the distinctive features of a KSDA, key sequenced dataset?
What is a CA, control area?
What are the types of VSAM datasets ?
verview:VSAM Interview Questions for Beginner Intermediate as well as
for Advanced Level

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


What is a CI, control interval?
What is a path?
What is the upgrade set?
What is free space?
Do primary key values have to be unique? Do alternate key values have to
be unique?
In the COBOL SELECT statement what is the ORGANIZATION for a KSDS?
In the COBOL SELECT statement for a KSDS what are the three
possibilities for
ACCESS?
What is the purpose of the FILE STATUS clause in the SELECT statement?
If you wish to use the REWRITE command haw must the VSAM file be
opened?
Explain the meaning and syntax for the START command.
What is the utility program closely associated with VSAM?
There are at least seven IDCAMS commands; name and explain each of
them?
What is a LDS (Linear Data Set ) and what is it used for ?
What is a cluster?
What is the catalog?
What is RECOVERY and SPEED parameters in DEFINE CLUSTER command ?
Describe SHAREOPTIONS parameter (SHR) in Define Cluster command.
What is an alternate index?

What are the three levels of definition for the VSAM DEFINE?
What is the significance of the SHAREOPTIONS parameter?
What is the meaning of the DEFINE MODEL parameter?
What is File Status in VSAM ?
Under IDCAMS, multiple functions can be executed, each of which returns
a condition
code. What will be the condition code returned to the operating system ?
What is Control Interval, Control Area ?
What is FREESPACE ?
What is the meaning of each of the values in SHAREOPTS (2 3) ?
How do you define a kSDS ?
How do you define an ALTINDX ? How do you use ALTINDXs in batch, CICS
program's ?
What happens when you open an empty VSAM file in a COBOL program for
input ?
How do you initialize a VSAM file before any operation ? a VSAM with
alternate
index ?
What does a file status of 02 on a VSAM indicate ?
How do you calculate record size of an alternate cluster ? Give your values
for both
unique and nonunique.
What is the difference between sequential files and ESDS files ?
How do you load a VSAM data set with records ?
How do you define a GDG ?
What is the device independent method to indicate where a Record is
Stored ?

How many times secondary space allocated ?


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 ?
During processing of a VSAM file, some system error occurs and it is
subsequently unusable What do you do ?
How do you fix the problem associated with VSAM out of space condition ?
What is the meaning of VSAM RETURN-CODE 28 ?
On which dataset You can have ALT INDEX ?
How many ALternate Indexes you can have on a dataset ?
What are the optional parameters to the input dataset While loading the
empty
cluster with the data records ?
What is IDCAMS ? and what is the purpose of it ?
How to delete a member using JCL.
What is the difference between LDS and ESDS ?
Is a delete operation possible in an ESDS ? B, is rewrite operation possible
in
ESDS ?
What is the RRN for the first record in RRDS ?
What is a Base Cluster ?
If FSPC(100 100) is specified does it mean that both the control interval
and
control area will be left empty because 100 % of both CI and CA are
specified to be empty ?

VSAM Interview Questions,Mainframe VSAM Interview and Answers,IBM


VSAM Interview Questiions and Answers
1. What are the different types of VSAM files available?
ESDS: Entry Sequence Data Set
KSDS: Key Sequence Data Set
RRDS: Relative Data Set
2. What is IDCAMS ?
IDCAMS is the Access Method Services program. You run the IDCAMS program and
supply AMS commands thru SYSIN. (examples of AMS commands are DELETE,
DEFINE, REPRO etc..).

3. Can AMS commands be run from the TSO prompt ?


Yes
4. Syntax of AMS modal commands ?
Note: these can be used only under IDCAMS and not from the TSO prompt.
IF LASTCC(or MAXCC) >(or <,= etc..) value - THEN - DO - command set (such as
DELETE, DEFINE etc..) ELSE - DO - command set LASTCC - Condition code from the
last function(such as delete) executed MAXCC - Max condition code that was
returned by any of the prev functions SET is also a valid AMS command. SET LASTCC
(or MAXCC) = value The maximum condition code is 16. A cond code of 4 indicates
a warning. A cond code of 8 is usually encountered on a DELETE of a dataset that is
not present. 5. Under IDCAMS , multiple functions can be executed, each of
which returns a cond code. What will be the condition code returned to the
operating system ?
The maximum condition code generated is returned as the condition code of the
IDCAMS step.
6. What is Control Interval, Control Area ?
Control Interval is analogous to a physical block for QSAM files. It is the unit of i/o.
Must be between 512 bytes to 32 k. Usually either 2K or 4K. A larger control interval
increases performance for sequential processing while the reverse is true for
random access. Under CICS when a record is locked, the entire CI gets locked.
Control area is a group of control intervals. CA is used during allocation. CA size is
calculated based on the allocation type (cyl, tracks or records) and can be max of 1
cylinder.
7. What is FREESPACE ?
Coded in the DEFINE as FREESPACE(ci ca) where ci is the percentage of each control
interval to be left free for insertions, ca is the percentage of control intervals in each

control area to be left empty.


8. How do you decide on optimum values for CI, FREESPACE etc..?
CI size should be based on record length, type of processing. Usually CI is 4K. If
record length is larger(>1K), chose 6K or 8K.
FREESPACE should be large if more number of insertions are envisaged. Usual
values are (20 20) when heavy updates are expected. CI size can be calculated.
9. Would you specify FREESPACE for an ESDS?
No. Because you cannot insert records in an ESDS, also when you rewrite a record, it
must be of the same length. Thus putting any value for freespace does not make
any sense.
10. What is SHAREOPTS ?
SHAREOPTS is a parameter in the DEFINE and specifies how an object can be shared
among users. It is coded as SHAREOPTS(a b), where a is the cross region share
option ie how two or more jobs on a single system can share the file, while b is the
cross system share option ie how two or more jobs on different MVSes can share the
file. Usual value is (2 3).
11. What is the meaning of each of the values in SHAREOPTS(2 3)?
Value of 2 for cross region means that the file can be processed simultaneously by
multiple users provided only one of them is an updater. Value of 3 for cross system
means that any number of jobs can process the file for input or output (VSAM does
nothing to ensure integrity).
12. How do you define a KSDS ?
DEFINE CLUSTER(cluster name) with the INDEXED parameter. Also specify the ds
name for the DATA component & the ds INDEX component. Other important parms
are RECORDSIZE, KEYS, SHAREOPTIONS.
13. How do you define an ALTINDX ? How do you use ALTINDXs in batch,
CICS pgms ?
DEFINE ALTERNATEINDEX. Important paramters are RELATE where you specify the
base cluster name, KEYS, RECORDSIZE,SHAREOPTIONS,UNIQUEKEY(or
NONUNIQUEKEY), DATA(ds name for the data component), INDEX(ds name for the
index component).
Then DEFINE PATH. Important paramters are NAME (ds name for the path),
PATHENTRY (ds name of the alternate index name), UPDATE(or NOUPDATE) which
specifies whether an alt index is updated when a update to the base cluster takes
place.
Then BLDINDEX. Parameters are INDATASET(ds name of base cluster),
OUTDATASET(ds name of AIX).
Using alternate indexes in batch pgms:
In the JCL, you must have DD stmts for the cluster and for the path(s). In the cobol

pgm, SELECT .. ASSIGN TO ddname for base cluster RECORD KEY IS... ALTERNATE
RECORD KEY IS..
Using alternate indexes in CICS pgms:
FCT entries must be created for both base cluster & the path. To read using the
alternate index, use the dd name of the path in CICS file control commands.

What is an alternate index ?


An alternate index is another file related to the cluster, but sorted using an alternate key that can
have duplicates.
How do you create an alternate index ?
You use the IDCAMS utility with the DEFINE AIX option after you build the cluster and then do
another IDCAMS with the BLDINDEX option to populate the alternate index.
What parameter in the DEFINE AIX option is used to determine the maximum number of
duplicate keys allowable ?
The RECORDSIZE parameter. There are 2 numbers that follow this: the 1st is the average and
the 2nd is the maximum. The values are equal to 5 + (cluster key length) + N*(alternate key
length), where N is the allowable number of duplicates.
Name a few common VSAM status codes.
00-OK
02-READ a duplicate alternate key
10-end of file reached while doing a READ
22-trying to WRITE a duplicate primary key
23-record not found while doing a READ
97-file integrity verified, do an IDCAMS VERIFY
What is buffering and how does it apply to VSAM files ?
When large blocks of data are used, more main storage is required than when smaller blocks are
used, but large blocks save CPU time and disk space. Additionally, extra buffers may save
elapsed time since the program does not have to wait for an I/O to complete for it to continue
processing.
In the JCL, you specify BUFNI (number of index buffers) and BUFND (number of data buffers)
as subparameters of the AMP parameter.
For random access, the BUFNI is one more than the number of index levels and a BUFND of 2
is fine.

For sequential access, a BUFNI of 1 and a minimum of 5 for BUFND is fine.


For dynamic access, the values of each is the higher of the numbers for either random or
sequential.

Overview:Mainframe VSAM Interview Questions, Check out this collection


of Virtual Storage Access Method (VSAM) Interview Questions
What is the REPRO command?
While a new cluster is created using IDCAMS, cluster will be empty. By using the
REPRO
command, we can load records into the cluster.
REPRO is used to:
Copy Datasets (VSAM or NON-VSAM), copy catalogs.
Convert sequential and index sequential Datasets to VSAM format
Convert VSAM and Index sequential Datasets to sequential format
Backup VSAM catalog
Read a backup copy of VSAM catalogs.
Is it slower if you access a record through ALTERNATIVE INDEX as
compared to
Primary INDEX?
YES. Because the alternate Key would first locate the primary Key, which in turn
locates the
actual record. Needs twice the number of I/Os.
What is RECOVERY and SPEED parameters in DEFINE CLUSTER command?
RECOVERY (default) and SPEED are mutually exclusive. Recovery pre-formats 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.
What is a 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)
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).
What are the optional parameters to the input DataSet While loading the
empty cluster with the data records?
i) Skip and Count
Syntax:
SKIP(2)
COUNT(4)
In this case, the first two records are skipped and the next four records are printed.
The
default for SKIP is 0, and for COUNT will be printing records from beginning to end.
ii) FromKey and ToKey
PRINT INDATASET (CUSTOMER.KSDS.CLUSTER) FROMKEY (111111) TOKEY (444444)
Will print all records with Key value ranging from 111111 to 444444.
iii) FROMADDRESS and TOADDRESS
iv) FROMNUMBER and TONUMBER
What does GDG mean in VSAM?
Generation Data Group
Is a delete operation possible in an ESDS? Is rewrite operation possible in
ESDS ?
No. Delete operation is not possible in VSAM ESDS. Yes, rewrite operation is possible
in an
ESDS.
Can VSAM files be deleted with the DELETE option of the DISPOSITION
parameter of JCL?
No, you have to give a separate DELETE command in the VSAM cluster.
How many buffers are allocated to VSAM KSDS and ESDS?
2 data buffers by default for ESDS. For KSDS it allots 2 data buffers and 1 index
buffers. Each
buffer is about 4k.
What are the codes returned by the AMS (Access Method Services)
command during the execution?
Every AMS command issues a condition code. If multiple commands are being
executed
Successively, there might be a requirement to execute or bypass certain commands

on the
Success or failure of a previous command.
The normal condition codes returned by AMS commands are :
0 - The function was executed successfully
4 - A problem was encountered while executing the function, WARNING
8 - The requested function was executed, but major specifies were unavoidably
bypassed,
ERROR
12 - The requested command could not be performed because of a logical error,
SEVERE
16 - A severe error occurred causing the remainder of the command stream to be
bypassed., FATAL.
What are the 3 types of VSAM files ?
1-ESDS (Entry sequenced dataset). DB2 uses a special type of ESDS.
2-RRDS (Relative record dataset). Records are accessed using a relative number.
3-KSDS (Key sequenced dataset) is the most common type encountered. The record
sequence is determined by a unique key field.
How do you create a VSAM file ?
You use the IDCAMS utility with the DEFINE CLUSTER option.
How do you copy to a VSAM cluster ?
You use the IDCAMS utility with the REPRO option.

Tags:VSAM Interview Questions and Answers,IBM Mainframe VSAM Interview


,Technical Interview on Mainframe VSAM,FAQs on VSAM,VSAM Solutions
In ESDS, do we have the facility of accessing the records randomly?
YES, Random access of records is possible. Records however cannot be deleted. We can do it
By referring the RBA (relative byte address).
Why is the space is kept in data component of the KSDS Dataset?
Free space specified during the allocation of the KSDS is left at regular intervals during the
initial load of the data set. This space helps keep the data component in physical sequence in
spite of
Random insertions.
What is the difference b/w the ESDS and KSDS?
ESDS doesnt have imbedded free space.
The KEYS parameter has no meaning in the context of ESDS
ESDS has no index component

An additional parameter, NONINDEXED is used to tell AMS that an ESDS is being allocated.
How is LDS different from ESDS?
An LDS is a data set; very similar to an ESDS without the control information .It has no records
and used for fast random access. It takes advantages of the computers very fast paging
hardware for retrieval and storage and the bytes are implicitly divided into 4K blocks or pages,
and the paging hardware reads and writes blocks from disk. There is no free space, unused
space, control field in LDS.
What is a CI, Control Interval?
A Control Interval is the unit of information that VSAM transfers between virtual and auxiliary
storage.
What is a CA, control area?
A group of Control Intervals makes up a control area.
What is Control Interval Split?
A new record stored in same CI, only if there is enough space. If not VSAM locates the free CI
within the same CA, moves approximately half of the records to next CI and stores the new
record at the correct position. This is called Control Interval Split. Whenever CI split occurs the
sequence set is updated.

If the records are larger than the CI size, for ex. if a record extend CI boundary and
extends unto 3 CI, and there is still some space left in last i.e. third CI, will that be used by
other CI Datasets ?
NO. Some records are larger than the CI size, the records extend across CI boundaries (only for
ESDS and KSDS). A spanned record begins on a CI boundary and it occupies two or more CIs in
a CA. The unused space in the last CI can only be used to extend the record, it cannot
contain any other record i.e. a new record has to be added in a new CI.
What is a sequence set?
This is the part of the index that points to the CA and CI of the record being accessed.
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, i.e. to all parts of the Dataset
simultaneously.
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.

What is a Catalog?
The catalog contains the names of all Datasets, VSAM and non-VSAM. It is used to access these
Datasets.
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. The
Alternate Key-pointer pair records are stored in an index cluster. This index cluster is known as
Alternate index. The alternate Key-pointer pair records are loaded into the alternate index cluster
by the command BLDINDEX.AIX can be built over a KSDS and ESDS, but not over an RRDS.
What could be the maximum number of the AIXs per base cluster?
There can be a maximum of 253 AIXs per base cluster. It is not advisable to have more than 5
AIXs per base cluster because of additional overhead during updates and retrievals.
Can AIX be defined over an ESDS, which does not have any Key?
Although an ESDS does not have a primary Key, an AIX can be defined over an ESDS. In the
case of an ESDS it is the relative byte address of the corresponding record in the base cluster
that is stored.
Can we access records in VSAM only by a single Key, i.e. primary Key?
It is also possible to access the records in a sequence other than that of the primary Key. Such
Keys are called alternate Keys and they can be non-unique.
For Example, in a pay-roll system where employee number is the unique primary Key and the
Employee name as alternate Key.
What is the 'verify' command in the VSAM files?
This command is used to close those files that are kept open after the abnormal termination of
the file. It also brings the index component in sync with the data components and updates the
catalog.
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.

Mainframe VSAM Interview Questions and Answers


What is the upgrade set?
The upgrade set is the list of all AIXs 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.
What is free space?
Free space is reserved within the data component of a KSDS to accommodate
inserting new
records.
What is IDCAMS? and what is the purpose of it?.
IDCAMS, also known as Access Method Services, is used to perform the following
tasks:
Create a VSAM data set, VSAM alternate index, or catalog.
List a catalog entry for a data set, Dataset/catalog contents.
Copy a Dataset or catalog.
Convert non-VSAM to VSAM data set.
Load a VSAM Dataset from VSAM records
Rename VSAM data sets.
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.
What is the base cluster?
The base cluster consists of the data component and the index component for the
primary index
of a KSDS.
What will happen if there is no secondary allocation made for Datasets?
VSAM will inform COBOL program of the problem and terminate the processing of
the program.
Why CI and CA splits are not possible in ESDS and RRDS?
In ESDS the new record is added at the end of last record. And no imbedded free
space is
allocated at the time of Dataset definition. In the case of RRDS the slots for the
records are pre-allocated and so the CI and CA split is not possible.
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.

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


The ORGANIZATION is INDEXED.
In the COBOL SELECT statement for a KSDS what are the three possibilities for
ACCESS?
ACCESS can be SEQUENTIAL, RANDOM or DYNAMIC.
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.
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.
If you wish to use the REWRITE command how must the VSAM file be opened?
It must be opened I/O mode.
Explain the meaning and syntax for the START command?
The START command is used to 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.
What is the meaning of dynamic processing?
It means one program uses both sequential and random processing for a VSAM
KSDS file. It's
rarely used.
Name some common VSAM error conditions and codes?
They are end of file (10), duplicate Key (22), record not found (23), Out of space
condition is
raised (28) ,VSAM logic error (90), open problem (92) and space problem (93).
bIt 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.

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.
What is the utility program closely associated with VSAM?
IDCAMS, the access method services utility.
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, of course.
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.
What are the three levels of definition for the VSAM DEFINE?
They are DEFINE CLUSTER, DATA and INDEX.
What is the significance of the SHAREOPTIONS parameter?
It specifies how the file may be shared between jobs and between batch and CICS
Environments.
What is the meaning of the DEFINE MODEL parameter?
It specifies whether the MODEL parameter allows you to model your cluster by
modelling it
after an existing cluster.
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 set 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.
In how many ways can you load the data in a VSAM cluster?
1. Using the REPRO command.
2. Using COBOL program

You might also like