Virtual storage access method (VSAM) Interview Preparation Guide
Download PDF

VSAM Interview Questions and Answers will guide us now that Virtual storage access method (VSAM) is an IBM disk file storage access method, first used in the OS/VS2 operating system, later used throughout the Multiple Virtual Storage (MVS) architecture and now in z/OS. Originally a record-oriented filesystem, VSAM comprises four data set organizations: KSDS, RRDS, ESDS and LDS. So learn Virtual storage access method by this VSAM Interview Questions with Answers guide

86 VSAM Questions 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..).

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.

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