IBM Systems Magazine, Mainframe - September/October 2015 - (Page 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 SEPTEMBER/OCTOBER 2015 // 39

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