The Makers of FDR®


How VSAM Works

print-friendly version
The following document has been extracted from the IAM Concepts & Facilities guide and it describes, in simple terms, the structure of a VSAM KSDS.

By reading this document, you will gain a good basic understanding of how VSAM works, and you’ll also understand how the VSAM file structure can be the root cause of many performance problems within applications that make heavy use of VSAM.

Introduction

IBM’s primary access method, VSAM, has been around now for several decades, yet it is still frequently used as the basis for high-profile ‘bought in’ packages—such as Financial and Personnel applications—as well as numerous ‘home-grown’ systems. The very highest levels of a company’s Management (e.g. Financial Directors) can often use these applications, as well as the regular workforce.

The design of VSAM directly affects the performance and efficiency of these systems. Common problems caused by VSAM are an increase in Response Times during the online day and/or an unacceptably long overnight Batch Window, which then impacts the availability of the online system the following morning. The use of DASD space can also be an issue, especially if users of an application are charged for their DASD consumption. Some files can grow very large—to several Gigabytes and more.

When these problems are being experienced, the users of the system (including Management) are unlikely to accept, or even understand, that the cause is due to the VSAM file structure. Equally, they will find it unacceptable to be told that, because of the nature of VSAM, there is little that can be done without a great deal of manual intervention and tuning. They will want quick solutions. Unfortunately, traditional ‘quick’ solutions, like hardware upgrades, can only give short-term relief and are often very expensive to implement.

In order to understand fully the problems inherent in VSAM, it is first necessary to take a look at the VSAM file structure, as it is here that the root cause of the problems exists. We will concentrate on the structure of VSAM KSDSs although, as you will see in PART THREE, IAM also supports Alternate Index (AIX), RRDS and ESDS datasets. Readers already familiar with VSAM may wish to bypass the rest of PART ONE and move on to PART TWO on page 12. It is assumed that all readers have a basic understanding of Catalogs, VVDSs and VTOCs.

Defining a VSAM File

Let’s start by looking at how VSAM files are created. Under DFSMS, this can be done through regular JCL but, for the purposes of this overview, we will assume that IDCAMS is still the preferred method. The following JCL extract illustrates a DEFINE of a single Index VSAM KSDS using IDCAMS:

//DEFVSAM   EXEC  PGM=IDCAMS
//SYSPRINT   DD   SYSOUT=*
//SYSIN      DD   *
  DEFINE CLUSTER
    (NAME(MY.TEST.DATASET) -
    VOLUMES(MVS001) -
    SPEED REUSE ) -
  DATA (RECORDS(5000 500) -
    FREESPACE(10 20) -
    KEYS(10 0) -
    RECORDSIZE(256 256) -
    CISIZE(4096))
/*

return to top     return to overview  
< 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 >