Virtual storage access method

Virtual storage access method

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": Key Sequenced Data Set (KSDS), Relative Record Data Set (RRDS), Entry Sequenced Data Set (ESDS) and Linear Data Set (LDS). The KSDS, RRDS and ESDS organizations contain records, while the LDS organization (added later to VSAM) simply contains a sequence of bytes with no intrinsic record structure.

IBM uses the term "data set" in official documentation as a synonym of "file", and "DASD" instead of "disk drive".

VSAM records can be of fixed or variable length. They are organised in fixed-size blocks called Control Intervals (CIs), and then into larger divisions called Control Areas (CAs). Control Interval sizes are measured in bytes — for example 4 kilobytes — while Control Area sizes are measured in disk tracks or cylinders. Control Intervals are the units of transfer between disk and computer so a read request will read one complete Control Interval. Control Areas are the units of allocation so, when a VSAM data set is defined, an integral number of Control Areas will be allocated.

The Access Method Services utility program IDCAMS is commonly used to manipulate ("delete and define") VSAM data sets.

Custom programs can access VSAM datasets through data definitions (DDs) in Job Control Language (JCL) or in online regions such as in Customer Information Control Systems (CICS).

Both IMS/DB and DB2 are implemented on top of VSAM and use its underlying data structures.

VSAM files

The physical organization of VSAM data sets differs considerably from the organizations used by other access methods.

VSAM data sets consist of control intervals (CI) and control areas (CA). The size of the CI and CA is normally determined by the access method, and the way in which they are used is not visible to the user. There will be a fixed number of control intervals in each control area.

A control interval normally contains multiple records. The records are stored within the control interval starting from the low address upwards. Control information is stored at the other end of the control interval, starting from the high address and moving downwards. The space between the records and the control information is free space. The control information comprises two types of entry: a control interval descriptor field (CIDF) which is always present, and record descriptor fields (RDF) which are present when there are records within the control interval and describe the length of the associated record. Free space within a CI is always contiguous.

When records are inserted into a control interval, they are placed in the correct order relative to other records. This may require that records have to be moved up the control interval. Conversely, when a record is deleted, later records are moved down so that the free space remains contiguous. If there is not enough free space in a control interval for a record to be inserted, the control interval is split. Roughly half the records are stored in the original control interval while the remaining records are moved into a new control interval. The new control interval is taken from a pool of free control intervals within the same control area as the original control interval. If there is no remaining free control interval within that control area, the control area itself is split and the control intervals are distributed equally between the old and the new control areas.

You can use three types of record-orientated file organization with VSAM (the contents of linear data sets have no record structure):

VSAM sequential file organization

Also referred to as VSAM ESDS (entry-sequenced data set) organization, VSAM sequential file records are stored in the order in which they were entered.

VSAM entry-sequenced data sets are equivalent to QSAM sequential files. The order of the records is fixed.

VSAM indexed file organization

Also referred to as VSAM KSDS (key-sequenced data set) organization, VSAM indexed file records are ordered according to the collating sequence of a user-defined embedded prime key field. The prime key consists of one or more consecutive characters in the records. It uniquely identifies the record and determines the sequence in which it is accessed with respect to other records. The most important that has to be noted while going for the KSDS is that, the key value has to be in a sorted order in the file. A prime key for a record might be, for example, an employee number or an invoice number.

A KSDS has two parts: the index component and the data component. These may be stored on separate disk volumes.

A KSDS may have more than one key. A secondary key is provided by an alternate index which is itself a KSDS.

VSAM relative file organization

Also referred to as VSAM fixed-length or variable-length RRDS (relative-record data set) organization, VSAM relative file records are ordered by their "relative key". The relative key is the relative record number, which represents the location of the record relative to where the file begins. The relative record number identifies the fixed- or variable-length record.

In a VSAM fixed-length RRDS, records are placed in a series of fixed-length slots in storage. Each slot is associated with a relative record number. For example, in a fixed-length RRDS containing 10 slots, the first slot has a relative record number of one, and the tenth slot has a relative record number of 10.

In a VSAM variable-length RRDS, the records are ordered according to their relative record number. Records are stored and retrieved according to the relative record number that you set.

VSAM Data Access Techniques

There are three types of access technique for VSAM data:

* Local Shared Resources (LSR)
* Global Shared Resources (GSR)
* Non-Shared Resources (NSR)

Each is optimised for different access patterns. For example, LSR is optimised for "random" or direct access, whereas NSR is optimised for sequential access.

Another difference is that some access techniques are more available than others for specific execution and programming environments. For example, LSR access is easy to achieve from CICS while NSR access has historically been easier to use than LSR for batch programs.

Sharing VSAM data

Sharing of VSAM data between CICS regions can be done by VSAM Record-Level Sharing (RLS). This adds record caching and, more importantly, record locking. Logging and commit processing remain the responsibility of CICS which means that sharing of VSAM data outside a CICS environment is severely restricted.

Sharing between CICS regions and batch jobs requires Transactional VSAM, DFSMStvs. This is an optional program that builds on VSAM RLS by adding logging and two-phase commit, using underlying z/OS system services. This permits generalised sharing of VSAM data.

History

VSAM was introduced as a replacement for older access methods and was intended to add function, to be easier to use and to overcome problems of performance and device-dependence.

The KSDS organization was designed to replace ISAM, the Indexed Sequential Access Method. Changes in disk technology had meant that searching for data in ISAM data sets had become very inefficient. It was also difficult to move ISAM data sets as there were imbedded pointers to physical disk locations which became invalid if the data set was moved.

The RRDS organization was designed to replace BDAM, the Basic Direct Access Method. In some cases, BDAM data sets contained imbedded pointers which prevented them from being moved. However, most BDAM data sets did not and the incentive to move from BDAM to VSAM RRDS was much less compelling than that to move from ISAM to VSAM KSDS.

Linear data sets were added later, followed by VSAM RLS and then Transactional VSAM.

ee also

* Job Control Language (JCL)
* IBM mainframe utility programs
* ISAM
* Geneva ERS

References

* [http://www.redbooks.ibm.com/redbooks/SG246105/wwhelp/wwhimpl/js/html/wwhelp.htm VSAM Demystified]
* [http://www.redbooks.ibm.com/redbooks/SG246971/wwhelp/wwhimpl/js/html/wwhelp.htm DFSMStvs Overview and Planning Guide]
* [http://www.tiburontech.com/ VSAM Training, Outsourcing and Modernization]


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Virtual Storage Access Method — (VSAM, „Methode für Zugriff auf virtuellen Speicher“) ist eine Zugriffsmethode auf Dateien, die auf IBM Großrechnersystemen verwendet werden. Die Namensgebung basiert auf der Idee, Dateiinhalte wie Zellen im (virtuellen) Hauptspeicher adressieren …   Deutsch Wikipedia

  • Virtual Storage Access Method — (VSAM) es un esquema de almacenamiento de IBM del sistema operativo OS/VS2, utilizado también en la arquitectura MVS y ahora en z/OS. Es un sistema de ficheros orientado a registros que pueden estar organizados de cuatro maneras diferentes: Key… …   Wikipedia Español

  • Virtual Storage Access Method — Le Virtual Storage Access Method (VSAM) est une méthode de stockage informatique de données utilisée sur les systèmes z/OS. Cette méthode d accès comprend l organisation des données, les techniques d accès à ces données et des outils de… …   Wikipédia en Français

  • Virtual telecommunications access method — (VTAM) is IBM s software package that provides communications via telecommunication devices for mainframe environments. It is the implementation of Systems Network Architecture (SNA) for mainframes. VTAM provides an API for communications… …   Wikipedia

  • Access method — An access method is a function of a mainframe operating system that enables access to data on disk, tape or other external devices. They were introduced in 1963 in IBM OS/360 operating system. [http://researchweb.watson.ibm.com/journal/rd/255/ausl… …   Wikipedia

  • Indexed Sequential Access Method — Index Sequential Access Method (ISAM) ist eine von IBM Ende der 1960er Jahre entwickelte Zugriffsmethode für Datensätze einer Datei, die sowohl (sortiert) sequentiellen als auch wahlfreien (random) index basierten Zugriff zulässt. Eine Datei kann …   Deutsch Wikipedia

  • Index Sequential Access Method — (ISAM) ist eine von IBM Ende der 1960er Jahre entwickelte Zugriffsmethode für Datensätze einer Datei, die sowohl (sortiert) sequentiellen als auch wahlfreien (random) index basierten Zugriff zulässt. Eine Datei kann mehrere verschiedene Indizes… …   Deutsch Wikipedia

  • Direct access storage device — In mainframe computers and some minicomputers, a direct access storage device, or DASD (  /ˈdæ …   Wikipedia

  • Virtual Console — This article is about the Virtual Console component of Nintendo s game download services. For the computer user interface concept, see virtual console. Virtual Console Publisher(s) …   Wikipedia

  • Storage area network — Not to be confused with Network attached storage. Computer network types by geographical scope Body (BAN) Personal (PAN) Near me (NAN) Local (LAN) Home (HAN) Storage (SAN) Campus (CAN) Backbone Metropolitan (MAN) Wide (WAN) …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”