IBM Systems Magazine, Mainframe - September/October 2015 - 39

TECH SHOWCASE

Know
Your Data
Understanding VSAM can help you process and access information
By Barbara McDonald

oday's data is fueled by
industry trends in social,
mobile, cloud, big data
and analytics. Most people may
not think much about the format,
structure or location of the data
they access or generate. For those
who know and use IBM z Systems*
mainframes, having a basic understanding of the data format can
help application programmers and
general mainframe users better
process and access their data.
VSAM is one type of widely
used data format and access
method. Although many people
may have used or worked with it,
most don't fully understand the
different types of VSAM data, how
it works and why it's used instead
of another access method.
VSAM, a part of the IBM z/OS*
DFSMS product, was first introduced in the early 1970s with
three types of data set organizations-sequential, indexed and
direct-and was designed for data
stored on DASD. An integrated
catalog facility (ICF) is used
to contain the pertinent VSAM
data set and DASD information.
Access method services (AMS)
provide a useful set of functions
to define, delete, alter, list and
recover data sets. VSAM data sets

T

can be written and accessed using languages such
as COBOL, PL/I, Java* and Assembler.
Today, VSAM organizes data into four types of data
sets: key sequenced (KSDS), entry sequenced (ESDS),
relative record (RRDS) and linear (LDS). Having a
better understanding of the purpose of the data, how
it must be accessed, and the performance and recovery requirements help determine the application's
optimal data set type.

Types of Data Sets
The most commonly used VSAM data set type is
KSDS where fixed or variable-length data is kept in
sequence by a unique, embedded fixed-length primary key, along with an index structure that points
into the data. Of all data set types, KSDSs are ranked
highest in processor and I/O consumption, although
they do allow for easy programming for direct access
due to the key field and provide processing flexibility, as varying length records can be easily inserted or
deleted. Sequential access is faster than direct as it
avoids searching the index structure more than once
to locate the next record. However, direct access can
potentially save I/O by not retrieving the entire data
set sequentially to process only a small percentage
of the total records. To better manage the explosive
growth of data, VSAM does support compression
for KSDSs. z/OS features including DFSMShsm and
DFSMSrmm use KSDSs for their control data sets
and, in addition, CICS* uses KSDSs for online transaction and batch processing applications.
The simplest VSAM data set type is an ESDS, which
is comparable to a sequential non-VSAM data set in
that data is written in time sequence with new records
placed at the end of the data set. Unlike non-VSAM,

records can be updated as long as
the length does not change, and
record deletion is possible if the
application can identify invalid records and reuse the space for data
of the same length. The records
can be accessed sequentially or
directly via a relative byte address
(RBA), which is the offset to the
first byte of data in the record
from the beginning of the data set.
ESDSs are typically used by batch
processing applications that need
time ordered data, such as a log or
a journal.
An alternate index is a powerful mechanism used by VSAM to
allow a record of a KSDS or ESDS
to be accessed by more than one
key field, eliminating the need to
store the same data in different
sequences in multiple data sets
for various applications. Unlike
the primary key for a record, the
alternate key does not have to be
unique and can map to multiple
"base" records. It is possible to
build an index structure, also
called an alternate index, over an
ESDS based on a key value defined
by a specific location in each base
record. When used with an ESDS,
instead of accessing the data by
RBA, an alternate index in essence
provides a key field, which can be

ibmsystemsmag.com SEPTEMBER/OCTOBER 2015 // 39


http://www.ibmsystemsmag.com

IBM Systems Magazine, Mainframe - September/October 2015

Table of Contents for the Digital Edition of IBM Systems Magazine, Mainframe - September/October 2015

Table of Contents
Editor's Desk: Flexible options
IBM Perspective: The full potential of Linux
Infographic: Differentiate your cloud services and drive margins sky-high
Techbits: The P-TECH fast track
Partner PoV: Virtualizing system software can help reduce data center costs
Trends: IBM has the roadmap you need to get to business innovation
Currents: Thanks to mobile apps, users can access IBM z Systems services and data
IT Today: A Cloud IT Optimization Assessment can help determine the right solutions
Case Study: Letters Home: Western Illinois University improves school-to-student interaction with more eye-catching financial aid documents
Cover Story: Linux Breakthrough: New IBM LinuxONE systems are enterprise-grade and built for business-critical applications
Feature: Community Partnership: The new Open Mainframe Project capitalizes on the strengths of z Systems and Linux to foster growth
Feature: A Matter of Standards: The KVM hypervisor extends familiar tools to Linux on the mainframe
Tech Showcase: Understanding VSAM can help you process and access information
Administrator: New zHPF protocols offer up to a 68 percent reduction in I/O service time for write operations
Solutions: Integration Link; SIEM Agent for z/OS
Stop Run: Software engineer notes creative side with musical instruments and choirs
Reference Point - Global Events, Education, Resources for Mainframe
Mainframe Skills Special Report
2016 Mainframe Solutions Edition
IBM Systems Magazine, Mainframe - September/October 2015 - Intro
IBM Systems Magazine, Mainframe - September/October 2015 - Cover1
IBM Systems Magazine, Mainframe - September/October 2015 - Cover2
IBM Systems Magazine, Mainframe - September/October 2015 - 1
IBM Systems Magazine, Mainframe - September/October 2015 - 2
IBM Systems Magazine, Mainframe - September/October 2015 - Table of Contents
IBM Systems Magazine, Mainframe - September/October 2015 - Editor's Desk: Flexible options
IBM Systems Magazine, Mainframe - September/October 2015 - 5
IBM Systems Magazine, Mainframe - September/October 2015 - IBM Perspective: The full potential of Linux
IBM Systems Magazine, Mainframe - September/October 2015 - Infographic: Differentiate your cloud services and drive margins sky-high
IBM Systems Magazine, Mainframe - September/October 2015 - Techbits: The P-TECH fast track
IBM Systems Magazine, Mainframe - September/October 2015 - 9
IBM Systems Magazine, Mainframe - September/October 2015 - Partner PoV: Virtualizing system software can help reduce data center costs
IBM Systems Magazine, Mainframe - September/October 2015 - 11
IBM Systems Magazine, Mainframe - September/October 2015 - Trends: IBM has the roadmap you need to get to business innovation
IBM Systems Magazine, Mainframe - September/October 2015 - 13
IBM Systems Magazine, Mainframe - September/October 2015 - 14
IBM Systems Magazine, Mainframe - September/October 2015 - 15
IBM Systems Magazine, Mainframe - September/October 2015 - Currents: Thanks to mobile apps, users can access IBM z Systems services and data
IBM Systems Magazine, Mainframe - September/October 2015 - 17
IBM Systems Magazine, Mainframe - September/October 2015 - 18
IBM Systems Magazine, Mainframe - September/October 2015 - 19
IBM Systems Magazine, Mainframe - September/October 2015 - IT Today: A Cloud IT Optimization Assessment can help determine the right solutions
IBM Systems Magazine, Mainframe - September/October 2015 - 21
IBM Systems Magazine, Mainframe - September/October 2015 - 22
IBM Systems Magazine, Mainframe - September/October 2015 - 23
IBM Systems Magazine, Mainframe - September/October 2015 - Case Study: Letters Home: Western Illinois University improves school-to-student interaction with more eye-catching financial aid documents
IBM Systems Magazine, Mainframe - September/October 2015 - 25
IBM Systems Magazine, Mainframe - September/October 2015 - 26
IBM Systems Magazine, Mainframe - September/October 2015 - 27
IBM Systems Magazine, Mainframe - September/October 2015 - Cover Story: Linux Breakthrough: New IBM LinuxONE systems are enterprise-grade and built for business-critical applications
IBM Systems Magazine, Mainframe - September/October 2015 - 29
IBM Systems Magazine, Mainframe - September/October 2015 - 30
IBM Systems Magazine, Mainframe - September/October 2015 - 31
IBM Systems Magazine, Mainframe - September/October 2015 - Feature: Community Partnership: The new Open Mainframe Project capitalizes on the strengths of z Systems and Linux to foster growth
IBM Systems Magazine, Mainframe - September/October 2015 - 33
IBM Systems Magazine, Mainframe - September/October 2015 - 34
IBM Systems Magazine, Mainframe - September/October 2015 - 35
IBM Systems Magazine, Mainframe - September/October 2015 - Feature: A Matter of Standards: The KVM hypervisor extends familiar tools to Linux on the mainframe
IBM Systems Magazine, Mainframe - September/October 2015 - 37
IBM Systems Magazine, Mainframe - September/October 2015 - 38
IBM Systems Magazine, Mainframe - September/October 2015 - Tech Showcase: Understanding VSAM can help you process and access information
IBM Systems Magazine, Mainframe - September/October 2015 - 40
IBM Systems Magazine, Mainframe - September/October 2015 - 41
IBM Systems Magazine, Mainframe - September/October 2015 - Administrator: New zHPF protocols offer up to a 68 percent reduction in I/O service time for write operations
IBM Systems Magazine, Mainframe - September/October 2015 - 43
IBM Systems Magazine, Mainframe - September/October 2015 - 44
IBM Systems Magazine, Mainframe - September/October 2015 - 45
IBM Systems Magazine, Mainframe - September/October 2015 - 46
IBM Systems Magazine, Mainframe - September/October 2015 - Solutions: Integration Link; SIEM Agent for z/OS
IBM Systems Magazine, Mainframe - September/October 2015 - Stop Run: Software engineer notes creative side with musical instruments and choirs
IBM Systems Magazine, Mainframe - September/October 2015 - Cover3
IBM Systems Magazine, Mainframe - September/October 2015 - Cover4
IBM Systems Magazine, Mainframe - September/October 2015 - Reference Point - Global Events, Education, Resources for Mainframe
IBM Systems Magazine, Mainframe - September/October 2015 - MS0
IBM Systems Magazine, Mainframe - September/October 2015 - Mainframe Skills Special Report
IBM Systems Magazine, Mainframe - September/October 2015 - MS2
IBM Systems Magazine, Mainframe - September/October 2015 - MS3
IBM Systems Magazine, Mainframe - September/October 2015 - MS4
IBM Systems Magazine, Mainframe - September/October 2015 - MS5
IBM Systems Magazine, Mainframe - September/October 2015 - MS6
IBM Systems Magazine, Mainframe - September/October 2015 - MS7
IBM Systems Magazine, Mainframe - September/October 2015 - MS8
IBM Systems Magazine, Mainframe - September/October 2015 - MS9
IBM Systems Magazine, Mainframe - September/October 2015 - MS10
IBM Systems Magazine, Mainframe - September/October 2015 - MS11
IBM Systems Magazine, Mainframe - September/October 2015 - MS12
IBM Systems Magazine, Mainframe - September/October 2015 - MS13
IBM Systems Magazine, Mainframe - September/October 2015 - SE0
IBM Systems Magazine, Mainframe - September/October 2015 - 2016 Mainframe Solutions Edition
IBM Systems Magazine, Mainframe - September/October 2015 - SE2
IBM Systems Magazine, Mainframe - September/October 2015 - SE3
IBM Systems Magazine, Mainframe - September/October 2015 - SE4
IBM Systems Magazine, Mainframe - September/October 2015 - SE5
IBM Systems Magazine, Mainframe - September/October 2015 - SE6
IBM Systems Magazine, Mainframe - September/October 2015 - SE7
IBM Systems Magazine, Mainframe - September/October 2015 - SE8
IBM Systems Magazine, Mainframe - September/October 2015 - SE9
IBM Systems Magazine, Mainframe - September/October 2015 - SE10
IBM Systems Magazine, Mainframe - September/October 2015 - SE11
IBM Systems Magazine, Mainframe - September/October 2015 - SE12
IBM Systems Magazine, Mainframe - September/October 2015 - SE13
IBM Systems Magazine, Mainframe - September/October 2015 - SE14
IBM Systems Magazine, Mainframe - September/October 2015 - SE15
IBM Systems Magazine, Mainframe - September/October 2015 - SE16
IBM Systems Magazine, Mainframe - September/October 2015 - SE17
IBM Systems Magazine, Mainframe - September/October 2015 - SE18
IBM Systems Magazine, Mainframe - September/October 2015 - SE19
IBM Systems Magazine, Mainframe - September/October 2015 - SE20
IBM Systems Magazine, Mainframe - September/October 2015 - SE21
IBM Systems Magazine, Mainframe - September/October 2015 - SE22
IBM Systems Magazine, Mainframe - September/October 2015 - SE23
IBM Systems Magazine, Mainframe - September/October 2015 - SE24
IBM Systems Magazine, Mainframe - September/October 2015 - SE25
IBM Systems Magazine, Mainframe - September/October 2015 - SE26
IBM Systems Magazine, Mainframe - September/October 2015 - SE27
IBM Systems Magazine, Mainframe - September/October 2015 - SE28
IBM Systems Magazine, Mainframe - September/October 2015 - SE29
IBM Systems Magazine, Mainframe - September/October 2015 - SE30
IBM Systems Magazine, Mainframe - September/October 2015 - SE31
IBM Systems Magazine, Mainframe - September/October 2015 - SE32
IBM Systems Magazine, Mainframe - September/October 2015 - SE33
IBM Systems Magazine, Mainframe - September/October 2015 - SE34
IBM Systems Magazine, Mainframe - September/October 2015 - SE35
IBM Systems Magazine, Mainframe - September/October 2015 - SE36
IBM Systems Magazine, Mainframe - September/October 2015 - SE37
IBM Systems Magazine, Mainframe - September/October 2015 - SE38
IBM Systems Magazine, Mainframe - September/October 2015 - SE39
IBM Systems Magazine, Mainframe - September/October 2015 - SE40
http://www.ibmsystemsmagmainframedigital.com/mspcomm/ibmsystemsmag/ibmsystems_mainframe_20200708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20200506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20200304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20200102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/2020mfse
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20191112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20190910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20190708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20190506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20190304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/relevantz_20190102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/2019mfse
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20190102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20181112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20180910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20180708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20180506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20180304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20180102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/2018mfse
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20171112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20170910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20170910_v2
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20170708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20170506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20170304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_sesupp
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20170102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_linuxsupp
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20161112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/MainframeSecurity
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20160910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20160708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20160506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20160304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20160102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20151112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150910_se
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150910
http://www.ibmsystemsmagmainframedigital.com/MFSkills
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150506_supp
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20150102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20141112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20140910_v2
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20140910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20140708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_gt_201405
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/BigData
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20140506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20140304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20140102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20131112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20130910_v2
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20130910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20130708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20130506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20130304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20130102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20121112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/buyersguide2013
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20120910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20120708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20120506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20120304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20120102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/ibmsystems_mainframe_2012bg
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20111112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20110910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20110708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20110506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20110304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20110102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20101112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20100910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20100910_bg
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20100708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20100506
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20100304
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20100102
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20091112
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20090910
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20090708
http://www.ibmsystemsmagmainframedigital.com/nxtbooks/ibmsystemsmag/mainframe_20090506
https://www.nxtbook.com/nxtbooks/ibmsystemsmag/mainframe_20090304
https://www.nxtbookmedia.com