vsam presentation
TRANSCRIPT
-
8/3/2019 VSAM Presentation
1/18
1 1
VSAM(VIRTUAL STORAGE ACCESS METHOD)
-
8/3/2019 VSAM Presentation
2/18
2
VSAM:
VSAM is an IBM disk file storage method , first used inthe OS/VS1, OS/VS2 Release 1 (SVS) and Release 2 (MVS)operating systems, later used throughout the Multiple VirtualStorage (MVS) architectu re and now in z/OS.
VSAM DATASET ORGANIZATIONS
ESDS Entry Sequenced Data SetKSDS Key Sequenced Data SetRRDS (Fixed Length) Relative Record Data SetVRRDS Variable Length Relative Record Data SetLDS Linear Data Set
-
8/3/2019 VSAM Presentation
3/18
3
ESDS Entry Sequenced Data Set
KSDS Key Sequenced Data Set
RRDS (Fixed Length) Relative Record Data Set
VRRDS Variable Length Relative Record Data Set
LDS Linear Data Set
VSAM Dataset Organizations
-
8/3/2019 VSAM Presentation
4/18
4
Conventional (non-VSAM) access methods generally provide only a single type of dataset
organization. VSAM provides three:
Key Sequenced Data Set (KSDS) : Where each record is identified for access by specifying its key
value - a sequence of characters embedded in each data record which uniquely identify that
record from all other records in the dataset.
Entry Sequenced Data Set (ESDS) , where each record is identified for access by specifying its
physical location - the byte address of the first data byte of each record in relationship to the
beginning of the dataset.
Relative Record Data Set (RRDS) , where each record is identified for access by specifying its
record number - the sequence number relative to the first record in the dataset.
-
8/3/2019 VSAM Presentation
5/18
5
BSAM : Basic Sequential Access Method
QSAM : Queued Sequential Access Method
ISAM : Indexed Sequential Access Method
BDAM : Basic Direct Access Method
NON-VSAM Access Methods
-
8/3/2019 VSAM Presentation
6/18
6
VSAM supports three types of data access: Sequential,Random (also called Direct access) and Skip Sequential
Protection of data against unauthorized access is aninherent part of VSAM
Easily portable to AS/400, the PC or non-IBM computers
(cross system compatibility)
VSAM Characteristics
-
8/3/2019 VSAM Presentation
7/18
7
Options for optimizing performance
A multifunction service program (Access Method Services -
IDCAMS) for setting up catalog records and maintaining data sets
A format for storing data independently of the type of directaccess storage device on which it is stored
VSAM Characteristics (Contd.)
-
8/3/2019 VSAM Presentation
8/18
8
Catalog Management Logical Record
Key Field Physical Record
Cluster
Index Component
Record management Data component
Master/User Catalog
Data Space Control Interval and
Control Area
VSAM Terminology
-
8/3/2019 VSAM Presentation
9/18
9
Catalog Management : VSAM maintains extensive information about data sets and directaccess storage space in an integrated catalog facility (ICF) catalog. All VSAM files must bedefined in an ICF catalog.
Record Management : The record management part of VSAM contains the access method cod
Logical Record : A logical record maintains a logical relationship among all the data items in
the records. It is the way the programmer or user sees the data.
Physical Record : It implies the actual storage of data i.e where the data is
stored physically on the disk.Key Field : Identifies the item associated with the logical record.
Cluster : Collection of physical datasets that make up one logical data set.
-
8/3/2019 VSAM Presentation
10/18
10
Control Intervals
In non-VSAM data management methods, the unit of data that is moved betweenmemory and the storage device is defined by the block.
In VSAM, it is defined as a control interval . A control interval contains records , control information.
When a VSAM dataset is loaded, control intervals are created and records are written
into them.
With KSDS clusters, the entire control interval is usually not filled. Some percentage of free space is left available for expansion.
With ESDS clusters, each control interval is completely filled before records arewritten into the next control interval in sequence.
With RRDS clusters, control intervals are filled with fixed-length slots, each containingeither an active record or a dummy record. Slots containing dummy records areavailable for use when new records are added to the dataset.
-
8/3/2019 VSAM Presentation
11/18
Control Areas:
Control intervals are grouped together into control areas .
For ESDS and RRDS clusters, control areas are filled with control intervals that containrecords.
For KSDS clusters, some of the control intervals in each control area may consist
entirely of free space that can be used for dataset expansion.
-
8/3/2019 VSAM Presentation
12/18
12
ESDS CA Structure
-
8/3/2019 VSAM Presentation
13/18
1313
-
8/3/2019 VSAM Presentation
14/18
14
VSAM & NON-VSAM CATALOGS
The catalog keeps track of the unit and volume on which the dataset resides and can
be used for later retrieval of the dataset.
Non-VSAM dataset is created by means of the DISP=(,CATLG) JCL entry.
With VSAM datasets, creation of a catalog entry to record the unit and volume ismandatory.
Catalog entries for non-VSAM datasets were contained in OS CVOLS (operating systemcontrol volumes).
VSAM maintains its own catalog, also used to contain the catalog entries for non-VSAM datasets.
On the latest versions of OS/390 and z/OS, ICF (Integrated Catalog Facility) catalogsare the only type of catalogs supported.
-
8/3/2019 VSAM Presentation
15/18
15
DEFINING A VSAM CLUSTER
DEFINECLUSTER
(NAME(entryname)
{CYLINDERS(primary] secondary]) |
RECORDS(primary[ secondary]) |
TRACKS(primary[ secondary])}VOLUMES(volser[ volser...])
[BUFFERSPACE(size)]
[ERASE | NOERASE]
[FILE(ddname)][FREESPACE(CI-percent[ CA-percent]|0 0)]
-
8/3/2019 VSAM Presentation
16/18
16
[INDEXED | NONINDEXED | NUM BERED]
[KEYS(length offset|64 0)]
[MODEL(entryname[/password][ catname[/password]])]
[REPLICATE | NOREPLICATE]
[REUSE | NOREUSE]
[SPEED | RECOVERY]
[TO(date) | FOR(days)][UNIQ UE | SUBALLOCATION]
[DATA
([NAME(entryname)])
[INDEX ([NAME(entryname)])
-
8/3/2019 VSAM Presentation
17/18
17
EXAMPLE:
-
8/3/2019 VSAM Presentation
18/18
18
THANK YOU