Virtual Storage Access Method: Difference between revisions

Content deleted Content added
show DASD acronym
Update a ref; misc ce, mostly capitalization and MOS:NOBACKREF fixes
Line 2:
|url=https://www.datamation.com/netsys/article.php/3677001/New-Life-for-Legacy-Systems-at-LaBarge.htm
|title=New Life for Legacy Systems at LaBarge
|date=May 11, 2007}}</ref> is an [[IBM]] [[Direct access storage device|direct-access storage device]] (DASD) file storage [[access method]], first used in the [[OS/VS1]], OS/VS2 [[OS/VS2 (SVS)|Release 1]] (SVS) and [[MVS|Release 2]] (MVS) operating systems, later used throughout the [[Multiple Virtual Storage]] (MVS) architecture and now in [[z/OS]]. Originally a [[record-oriented filesystem]],{{#tag:ref|With the exception of catalogs, page spaces and swap<ref group=NB>No longer used.</ref> spaces, which unauthorized applications could access only via specialized OS services. Not to mention the fact that it's been in VSE for ever too and is used in z/VSE|group="NB"|name=notfile}} VSAM comprises four<ref group=NB name=notfile/> [[data set (IBM mainframe)|data set]] ''organizations'': [[Key Sequencedkey-sequenced Datadata Setset|key-sequenced]] (KSDS), [[Relativerelative Recordrecord Datadata Setset|relative record]] (RRDS), [[Entry Sequencedentry-sequenced Datadata Setset|entry-sequenced]] (ESDS) and [[Linearlinear Datadata Setset|linear]] (LDS).<ref name="demystified">{{cite book|url=httphttps://www.redbooks.ibm.com/pubsredbooks/pdfs/redbooks/sg246105.pdf |series=Redbooks |title=VSAM Demystified |first1=Mary |last1=Lovelace |first2=Jose |last2=Dovidauskas |first3=Alvaro |last3=Salla |first4=Valeria |last4=Sokal |pages=5 |chapter=1.3.2 Record management |edition=3 |publisher=IBM |date=MarchAugust 20132022}}</ref> The KSDS, RRDS and ESDS organizations contain records, while the LDS organization (added later to VSAM) simply contains a sequence of pages with no intrinsic record structure, for use as a [[memory-mapped file]].
 
==Overview==
An IBM ''Redbook'' named "VSAM PRIMER" (especially when used with the "Virtual Storage Access Method (VSAM) Options for Advanced Applications" manual) explains the concepts needed to make use of VSAM.<ref>{{cite web
|url=http://www.computinghistory.org.uk/det/9393/IBM-International-Systems-Centers-VSAM-Primer-for-the-Intergrated-Catalog-Facility-in-an-MVS-Environment
|title=VSAM Primer}}</ref> IBM uses the term ''data set'' in official documentation as a synonym offor ''file'', and ''[[direct -access storage device]]'' (''DASD'') becausefor itdevices supportedwith other[[random devices similaraccess]] to ''data locations, such as disk drives'', as opposed to devices such as tape drives that can only be read sequentially.
 
VSAM records can be of fixed or variable length. They are organised in fixed-size blocks called [[Controlcontrol Intervalinterval]]s (CIs),<ref name="VSAM.CI1">{{cite web |title=VSAM – Components |url=https://www.tutorialZpoint.com/vsam/vsam_components.htm}}</ref><ref name=VSAM.CI2>{{cite web
|url=https://www.ibm.com/support/knowledgecenter/en/SSLTBW_2.1.0/com.ibm.zos.v2r1.idad400/d4221.htm
|title=Control Interval Size Limitations|website=[[IBM]] |date=27 March 2014 }}</ref> and then into larger divisions called Control Areas (CAs). Control Interval sizes are measured in bytes{{snd}} for example 4 [[kilobyte]]s{{snd}} 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.
Line 19:
|title=User's Guide}}</ref> are implemented on top of VSAM and use its underlying [[data structure]]s.
 
==VSAM filesFiles==
The physical organization of VSAM data sets differs considerably from the organizations used by other access methods, as follows.
 
A VSAM file is defined as a cluster of VSAM components, e.g., for KSDS a DATA component and an INDEX component.
 
===Control Intervalsintervals and Controlcontrol Areasareas===
VSAM components consist of fixed length physical blocks grouped into fixed length control intervals<ref name=VSAM.CI1/><ref name=VSAM.CI2/> (CI) and control areas (CA). The size of the CI and CA is determined by the [[IBM mainframe utility programs#IDCAMS|Access Method Services]] (AMS), and the way in which they are used is normally not visible to the user. There will be a fixed number of control intervals in each control area.
 
Line 33:
You can use three types of record-orientated file organization with VSAM (the contents of linear data sets have no record structure):
 
===Sequential VSAM organization===
{{further|Entryentry-sequenced Sequenceddata Data Setset}}
 
An ESDS may have an index defined to it to enable access via keys, by defining an Alternate Index. Records in ESDS are stored in order in which they are written by address access.<ref>{{cite web
Line 44:
}}</ref> Records are loaded irrespective of their contents and their byte addresses cannot be changed.
 
===Indexed VSAM organization===
{{further|Keykey-sequenced Sequenceddata Data Setset}}
A KSDS has two parts: the index component and the data component. These may be stored on separate disk volumes.
 
While a basic KSDS only has one key (the primary key), alternate indices may be defined to permit the use of additional fields as secondary keys. An Alternatealternate Indexindex (AIX) is itself a KSDS.
 
The data structure used by a KSDS is nowadays known as a [[B+ tree]].<ref>{{cite web
Line 57:
|title=What is VSAM?}}</ref>
 
===Relative VSAM organization===
{{further|Relativerelative Recordrecord Datadata Setset}}
 
An RRDS may have an index defined to it to enable access via keys, by defining an Alternate Index.
 
=== Linear VSAM organization ===
{{further|Linearlinear Datadata Setset}}
An LDS is an unstructured VSAM dataset with a control interval size of a multiple of 4K. It is used by certain system services.
 
== VSAM Data Accessaccess Techniquestechniques ==
There are four types of access techniques for VSAM data:
 
Line 79:
* Distributed File Management (DFM), an implementation of a [[Distributed Data Management Architecture]] server, enables programs on remote computers to create, manage, and access VSAM files.
 
==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.
 
Line 108:
* [[Record Management Services]], a similar system developed by [[Digital Equipment Corporation]]
* [[Enscribe]], a similar system developed by [[Tandem Computers]]
 
== Notes ==
{{Reflist|group=NB}}