Virtual Storage Access Method

VSAM arranges records by an index key, relative record number, or relative byte addressing. VSAM is used for direct or sequential processing of fixed-length and variable-length records on DASD. Data that is organized by VSAM is cataloged for easy retrieval and is stored in one of five types of data sets.
  • Entry-sequenced data set (ESDS). Contains records in the order in which they were entered. Records are added to the end of the data set and can be accessed.
  • Key-sequenced data set (KSDS). Contains records in ascending collating sequence. Records can be accessed by a field, called a key, or by a relative byte address.
  • Linear data set (LDS). Contains data that has no record boundaries. Linear data sets contain none of the control information that other VSAM data sets do. Linear data sets must be cataloged in a catalog.
  • Relative record data set (RRDS). Contains records in relative record number order, and the records can be accessed only by this number. There are two types of relative record data sets.
    • Fixed-length RRDS: The records must be of fixed length.
    • Variable-length RRDS: The records can vary in length.
    Throughout this document, the term RRDS refers to both types of relative record data sets, unless they need to be differentiated.
  • z/OS® UNIX files. A UNIX file can be accessed as if it were a VSAM entry-sequenced data set (ESDS). Although UNIX files are not stored as entry-sequenced data sets, the system attempts to simulate the characteristics of such a data set. To identify or access a UNIX file, specify the path that leads to it.

Any type of VSAM data set can be in extended format. Extended-format data sets have a different internal storage format than data sets that are not extended. This storage format gives extended-format data sets additional usability characteristics and possibly better performance due to striping. You can choose for an extended-format key-sequenced data set to be in the compressed format or encrypted format or both. Extended-format data sets must be SMS managed. You cannot use an extended-format data set for certain system data sets.

Requirement: Do not use BISAM or QISAM. Use VSAM instead.

VSAM data set performance can benefit from using the IBM® DS888x zHyperlink technology, also known as synchronous I/O. zHyperLink can achieve significant I/O latency improvements for read requests when using non-linear VSAM data sets. When zHyperLink is enabled on the system and a control unit (CI) of data is in the control unit cache, a VSAM read request stays synchronous while the CI is retrieved with a latency time of 20 to 30 microseconds, significantly better than the more than 100-microsecond latency of traditional DASD I/O. While zHyperLink improves latency time, it also incurs small additional CPU utilization. VSAM and VSAM RLS users should monitor the tradeoff, as well as the SMF42 subtypes 5 and 6 counts that are related to zHyperLink ('syncIO').

zHyperLink I/O is disabled system-wide by default. To do zHyperLink I/O for a read request, all of the following conditions must be met and checked by VSAM and VSAM RLS before they issue a zHyperLink I/O request:
  • The user has issued the SETIOS ZHYPERLINK OPER=[ALL|READ] command, or SYS1.PARMLIB(IECIOSxx) specifies ZHYPERLINK,OPER=[ALL|READ]. NONE is the default in z/OS 2.1 through z/OS 2.3. In z/OS 2.4, ALL is the default.
  • SYS1.PARMLIB(IGDSMSxx) or the SETSMS command specifies VSAM_ZHYPERLINK(YES), where NO is the default.
  • Specify zHyperLink Eligible for Read: YES in the storage class. This is the standard way to make the data sets eligible for zHyperLink.
  • V SMS,DSNAME(datasetname) ZHLREAD=YES is issued to make read I/O for the specified data set synchronous, overriding the specification in the storage class and making it eligible for zHyperLink. Default is not to override the storage class specification.
  • For VSAM, if the buffers are provided by the user, they must be on a quadword boundary.

When all of those conditions are met and VSAM or VSAM RLS initiates a zHyperLink I/O request, the I/O driver can still do asynchronous I/O because the CI is larger than the size specified in the current READLIMIT setting for zHyperLink, or the CI is not found in control unit cache. For more information about READLIMIT, see ZHYPERLINK in z/OS MVS Initialization and Tuning Reference. In that situation, VSAM RLS accumulates the suspend elapsed time for the asynchronous DASD I/O for the data set. The counts are recorded in SMF42 subtype 6 fields S42SNAvgARDelay S42SNARDelayCount to help the users understand the potential performance benefits of enabling zHyperLink reads for VSAM RLS data sets. Non-RLS VSAM does not do such count.