VSAM Demystified

Book description

Virtual Storage Access Method (VSAM) is one of the access methods used to process data. Many of us have used VSAM and work with VSAM data sets daily, but exactly how it works and why we use it instead of another access method is a mystery.

This book helps to demystify VSAM and gives you the information necessary to understand, evaluate, and use VSAM properly. This book also builds upon the subject of Record Level Sharing and DFSMStvs. It clarifies VSAM functions for application programmers who work with VSAM. The practical, straightforward approach should dispel much of the complexity associated with VSAM. Wherever possible an example is used to reinforce a description of a VSAM function.

This IBM® Redbooks® publication is intended as a supplement to existing product manuals. It is intended to be used as an initial point of reference for VSAM functions.

Table of contents

  1. Front cover
  2. Notices
    1. Trademarks
  3. Preface
    1. The team who wrote this book
    2. Now you can become a published author, too!
    3. Comments welcome
    4. Stay connected to IBM Redbooks
  4. Summary of changes
    1. August 2022, Third Edition (minor update)
    2. March 2013, Third Edition
  5. Chapter 1. VSAM basics
    1. 1.1 VSAM functions by release level
    2. 1.2 What is VSAM?
      1. 1.2.1 What is an access method?
      2. 1.2.2 VSAM access types
    3. 1.3 VSAM functions
      1. 1.3.1 Catalog management
      2. 1.3.2 Record management
    4. 1.4 VSAM terminology and concepts
      1. 1.4.1 Logical record
      2. 1.4.2 Physical record
      3. 1.4.3 Control interval
      4. 1.4.4 Spanned records
      5. 1.4.5 Control area
      6. 1.4.6 Components
      7. 1.4.7 Clusters
      8. 1.4.8 Alternate indexes
      9. 1.4.9 Sphere
      10. 1.4.10 Splits
      11. 1.4.11 VSAM buffering
      12. 1.4.12 String multiprocessing
      13. 1.4.13 Catalog Search Interface
      14. 1.4.14 Extended Address Volume
    5. 1.5 VSAM data set organizations
      1. 1.5.1 Key-sequenced data set (KSDS)
      2. 1.5.2 Entry-sequenced data set
      3. 1.5.3 Relative record data set
      4. 1.5.4 Variable relative record data set
      5. 1.5.5 Linear data set
      6. 1.5.6 Comparing VSAM data set organizations
      7. 1.5.7 Selecting a VSAM data set type
    6. 1.6 Data striping
    7. 1.7 Processing a VSAM data set
      1. 1.7.1 Defining VSAM data sets
      2. 1.7.2 Allocating a VSAM data set
      3. 1.7.3 Opening a VSAM data set
      4. 1.7.4 Accessing VSAM data set
      5. 1.7.5 Unallocation
    8. 1.8 VSAM exploiters
      1. 1.8.1 DB2
      2. 1.8.2 zSeries file system
      3. 1.8.3 Hierarchical file system
      4. 1.8.4 CICS
      5. 1.8.5 DFSMShsm
      6. 1.8.6 DFSMSrmm
      7. 1.8.7 Java Record I/O (JRIO)
  6. Chapter 2. Managing your VSAM data sets
    1. 2.1 Reorganization considerations
      1. 2.1.1 Reorganizing because of lots of CI/CA splits
      2. 2.1.2 Reorganizing because of loss of useful space in data CA
      3. 2.1.3 DB2 table space reorganization
    2. 2.2 Sharing VSAM data sets
      1. 2.2.1 Integrity
      2. 2.2.2 Sharing VSAM data sets
      3. 2.2.3 Write and read integrity
      4. 2.2.4 VSAM sharing mechanisms
      5. 2.2.5 Sharing data in a single VSAM control block structure
      6. 2.2.6 Sharing data with many VSAM control block structures
      7. 2.2.7 General share options considerations
      8. 2.2.8 Protecting VSAM data set through DISP parameter
    3. 2.3 Extended format
      1. 2.3.1 Extended format characteristics
      2. 2.3.2 Creating an extended format data set
    4. 2.4 Extended addressability (EA)
    5. 2.5 Catalog Search Interface
      1. 2.5.1 CSI highlights
      2. 2.5.2 DITTO/ESA
    6. 2.6 Major sources of VSAM processing options
      1. 2.6.1 Access method Control Block (ACB)
      2. 2.6.2 DD statement keywords
      3. 2.6.3 Catalog BCS and VVDS entries
      4. 2.6.4 SMS constructs
    7. 2.7 Media Manager, Open, Close, EOV in VSAM
    8. 2.8 VSAM and 64 bits in real storage
    9. 2.9 Special considerations for COBOL users and SMB
      1. 2.9.1 Positioning error
      2. 2.9.2 Waits and hangs
      3. 2.9.3 ISAM data set programs
  7. Chapter 3. Guidelines for ICF catalog and VSAM
    1. 3.1 ICF catalog basics
      1. 3.1.1 Basic catalog structure (BCS)
      2. 3.1.2 VSAM volume data set (VVDS)
    2. 3.2 Factors affecting catalog performance
      1. 3.2.1 Catalog configuration
      2. 3.2.2 BCS definition
      3. 3.2.3 VVDS definition
      4. 3.2.4 Caching catalogs
      5. 3.2.5 GRS configuration
    3. 3.3 Catalog problem determination
      1. 3.3.1 Using the EXAMINE command
      2. 3.3.2 Using DIAGNOSE command
      3. 3.3.3 Locking Catalogs
    4. 3.4 Catalog management
      1. 3.4.1 Catalog sharing
      2. 3.4.2 Creating a balanced catalog environment
      3. 3.4.3 Reorganizing catalogs
      4. 3.4.4 Using the Catalog Search Interface (CSI)
      5. 3.4.5 SYSZTIOT catalog contention detection
      6. 3.4.6 Catalog autotuning function
      7. 3.4.7 Catalog backup and recovery
      8. 3.4.8 BCS forward recovery
      9. 3.4.9 RACF and REPRO MERGECAT command
      10. 3.4.10 Catalog IMBED/REPLICATE health check
      11. 3.4.11 Helpful frequently asked questions
      12. 3.4.12 Diagnosing prolonged catalog ENQ times
      13. 3.4.13 Monitoring the catalog address space
  8. Chapter 4. VSAM performance
    1. 4.1 Performance analysis
      1. 4.1.1 Service level agreement (SLA)
      2. 4.1.2 Transaction response time components
      3. 4.1.3 External throughput rate
      4. 4.1.4 I/O performance
    2. 4.2 VSAM performance management
    3. 4.3 VSAM defaults and rule-of-thumbs
    4. 4.4 Parameters affecting performance
      1. 4.4.1 Allocation units
      2. 4.4.2 Optimizing control area (CA) size
      3. 4.4.3 Partial release
      4. 4.4.4 Allocation constraint relief
      5. 4.4.5 Control interval size
      6. 4.4.6 FREESPACE definition for KSDS and VRRDS
      7. 4.4.7 Data Control Area Reclaim
      8. 4.4.8 Index options
      9. 4.4.9 Keyrange and ordered options
      10. 4.4.10 Share options
      11. 4.4.11 Initial load option
      12. 4.4.12 Region size
      13. 4.4.13 Buffering options
      14. 4.4.14 How BUFFERSPACE, BUFSP, BUFND, and BUFNI affect buffering
      15. 4.4.15 Buffering techniques
      16. 4.4.16 Data compression
      17. 4.4.17 VSAM data striping
    5. 4.5 VSAM performance by scenarios
      1. 4.5.1 I/O response time components
      2. 4.5.2 Performance scenario that uses RMF reports
      3. 4.5.3 Reducing the number of I/Os
      4. 4.5.4 Decreasing the VSAM I/O response time
      5. 4.5.5 Decreasing VSAM CPU time
      6. 4.5.6 MIDAW facility
    6. 4.6 Performance monitors
      1. 4.6.1 Resource measurement facility
      2. 4.6.2 Tivoli Decision Support
      3. 4.6.3 Generalized trace facility
  9. Chapter 5. VSAM Record Level Sharing
    1. 5.1 Introducing VSAM RLS
      1. 5.1.1 What is VSAM RLS?
      2. 5.1.2 Why RLS?
      3. 5.1.3 How does RLS work?
      4. 5.1.4 RLS in a single system (monoplex)
      5. 5.1.5 CICS and VSAM RLS
      6. 5.1.6 SHAREOPTIONS and VSAM RLS
      7. 5.1.7 RLS restrictions
    2. 5.2 RLS terminology
      1. 5.2.1 SMSVSAM
      2. 5.2.2 VSAM sphere
      3. 5.2.3 RLS client
      4. 5.2.4 Subsystem
      5. 5.2.5 Batch
      6. 5.2.6 Record lock
      7. 5.2.7 True contention
      8. 5.2.8 False contention
      9. 5.2.9 True/False or False/False contention
      10. 5.2.10 Deadlocks
      11. 5.2.11 Read integrity
      12. 5.2.12 Retained lock
      13. 5.2.13 Lost Locks
      14. 5.2.14 Recoverable VSAM data set
      15. 5.2.15 Non-recoverable VSAM data set
      16. 5.2.16 Quiesce a VSAM data set
      17. 5.2.17 Quiesce transactions
      18. 5.2.18 Quiesce a volume or a cache
      19. 5.2.19 Sharing control
      20. 5.2.20 RLS mode
    3. 5.3 Planning for RLS
      1. 5.3.1 Hardware requirements
      2. 5.3.2 Software requirements
    4. 5.4 Implementing VSAM RLS
      1. 5.4.1 Defining Sharing Control Data Sets (SHCDS)
      2. 5.4.2 Defining CF cache structures
      3. 5.4.3 Defining the primary CF lock structure
      4. 5.4.4 Defining secondary lock structures (optional)
      5. 5.4.5 SMS definitions
      6. 5.4.6 Modifying the PARMLIB IGDSMSxx Member
      7. 5.4.7 Security definitions
      8. 5.4.8 Using a VSAM data set in RLS mode
      9. 5.4.9 RLS Recoverable data sets
    5. 5.5 RLS problem determination and recovery
      1. 5.5.1 Hang or Wait condition in RLS
      2. 5.5.2 Internal logic errors in RLS
      3. 5.5.3 Data integrity: VSAM Data Trap
      4. 5.5.4 VSAM_DATA_TRAP Health Check
      5. 5.5.5 Data integrity: VSAM index trap
      6. 5.5.6 Errors during RLS record management processing
      7. 5.5.7 Transaction recovery
      8. 5.5.8 Lock structure full
      9. 5.5.9 SHCDS recovery procedures
      10. 5.5.10 Latch contention
      11. 5.5.11 RLS rules
    6. 5.6 Operational procedures for RLS
      1. 5.6.1 Working with the SMSVSAM address space
      2. 5.6.2 Working with the CF structures
      3. 5.6.3 Working with the SHCDS
      4. 5.6.4 Monitoring data sets
      5. 5.6.5 Changing SMS parameters dynamically
      6. 5.6.6 Fallback procedure
      7. 5.6.7 Switching between RLS and non-RLS mode
      8. 5.6.8 Working with the IDCAMS SHCDS command
    7. 5.7 RLS enhancements
      1. 5.7.1 VSAM extended addressability
      2. 5.7.2 VSAM RLS CF lock structure duplexing and rebuilding
      3. 5.7.3 RLS CF caching enhancements
      4. 5.7.4 VSAM RLS data buffers above the 2-GB bar
      5. 5.7.5 VSAM data striping
      6. 5.7.6 Reliability and availability enhancements
      7. 5.7.7 Multiple lock structures
    8. 5.8 RLS performance
      1. 5.8.1 Speed of the CF hardware and software
      2. 5.8.2 DASD performance of the SHCDS data sets
      3. 5.8.3 CF synchronous and asynchronous requests
      4. 5.8.4 Local buffer pool sizing
      5. 5.8.5 RLS cache structures sizing
      6. 5.8.6 RLS lock structure sizing
      7. 5.8.7 Data set level parameters
      8. 5.8.8 Serialization at record level
      9. 5.8.9 Effect of a write dominant I/O workload
      10. 5.8.10 RLS lock structure duplexing
      11. 5.8.11 Recoverable VSAM data sets
      12. 5.8.12 Dealing with deadlocks
      13. 5.8.13 RLS performance gains
      14. 5.8.14 CICSPlex RLS performance comparison
      15. 5.8.15 Using RLS mode in an ESDS organization
    9. 5.9 RMF and VSAM RLS
      1. 5.9.1 RMF III reports
      2. 5.9.2 RMF Post Processor reports
      3. 5.9.3 SMF records covering VSAM RLS
    10. 5.10 VSAM and high availability
      1. 5.10.1 Using multiple CFs
      2. 5.10.2 Defining multiple cache structures
      3. 5.10.3 Placement of the SHCDSs
      4. 5.10.4 Remote copying your data
      5. 5.10.5 Making backup copies
      6. 5.10.6 Recovery protocols
  10. Chapter 6. DFSMStvs
    1. 6.1 Introducing DFSMStvs
    2. 6.2 Why DFSMStvs?
      1. 6.2.1 Extending CICS availability
      2. 6.2.2 Reducing the batch window
    3. 6.3 DFSMStvs terms and concepts
      1. 6.3.1 Backward recovery
      2. 6.3.2 Forward recovery
      3. 6.3.3 Atomic updates
      4. 6.3.4 Unit of work and unit of recovery
      5. 6.3.5 Two-phase commit
      6. 6.3.6 In-flight and in-doubt
      7. 6.3.7 Repeatable read
      8. 6.3.8 Recoverable data sets
    4. 6.4 CICS support for recoverable VSAM
    5. 6.5 The RLS connection
    6. 6.6 DFSMStvs logging
    7. 6.7 Recovery coordination
    8. 6.8 Ordering and installing DFSMStvs
    9. 6.9 Implementing DFSMStvs
      1. 6.9.1 Defining list structures in the CFRM policy
      2. 6.9.2 Defining the log structures and logstreams in LOGR policy
      3. 6.9.3 DASD staging data sets
      4. 6.9.4 Setting up RRS
      5. 6.9.5 Setting up security definitions
      6. 6.9.6 Modifying IGDSMSxx parmlib member
    10. 6.10 Application requirements for DFSMStvs
    11. 6.11 Operational considerations
      1. 6.11.1 Quiescing a data set
      2. 6.11.2 Closing/deleting/renaming a data set with inflight UR
      3. 6.11.3 Displaying DFSMStvs information
      4. 6.11.4 Controlling DFSMStvs processing
    12. 6.12 Changes to support DFSMStvs
      1. 6.12.1 Changes to job control language (JCL)
      2. 6.12.2 Changes to IDCAMS
      3. 6.12.3 Macros that have been changed to support DFSMStvs
  11. Chapter 7. VSAM problem determination and recovery
    1. 7.1 VSAM problem determination hints and tips
      1. 7.1.1 Checking your VSAM data set
      2. 7.1.2 z/OS system messages
      3. 7.1.3 System LOGREC messages
      4. 7.1.4 GTF CCW traces
      5. 7.1.5 What can you get from the SMF records?
    2. 7.2 Common VSAM problems
      1. 7.2.1 Lack of virtual storage
      2. 7.2.2 Initial loading problems
      3. 7.2.3 Mismatch between catalog and data set
      4. 7.2.4 Hardware errors
      5. 7.2.5 Bad data or bad channel program
      6. 7.2.6 Structural damage
      7. 7.2.7 Improper sharing
      8. 7.2.8 Mismatch between catalog and VTOC
      9. 7.2.9 VSAM does not produce expected output
      10. 7.2.10 VSAM RLS problems
      11. 7.2.11 Enqueue issues
      12. 7.2.12 Migration issues
      13. 7.2.13 Performance considerations
      14. 7.2.14 Deadlocks
      15. 7.2.15 VSAM restriction: REPRO to empty VSAM data set
    3. 7.3 What documentation to collect
      1. 7.3.1 IDCAMS problems
      2. 7.3.2 Broken VSAM data set
      3. 7.3.3 Obtaining a VSAM record management trace
    4. 7.4 Recovering a damaged VSAM data set
      1. 7.4.1 EXAMINE command
      2. 7.4.2 DIAGNOSE command
      3. 7.4.3 VERIFY command
      4. 7.4.4 Broken Index scenario
      5. 7.4.5 Abend task scenario
      6. 7.4.6 Recovering damaged BCS entries
      7. 7.4.7 Recovering damaged VVDS entries
    5. 7.5 Preventing future problems
      1. 7.5.1 Backing up your VSAM data sets
      2. 7.5.2 Keep your system at current maintenance levels
    6. 7.6 SMF record types that are related to VSAM data sets
      1. 7.6.1 SMF record type 60
      2. 7.6.2 SMF record type 61
      3. 7.6.3 SMF record type 62
      4. 7.6.4 SMF record type 63
      5. 7.6.5 SMF record type 64
      6. 7.6.6 SMF record type 65
      7. 7.6.7 SMF record type 66
      8. 7.6.8 SMF record type 67
      9. 7.6.9 SMF record type 68
      10. 7.6.10 SMF record type 69
      11. 7.6.11 SMF record type 42
    7. 7.7 VSAM data trap
      1. 7.7.1 Enabling, disabling, and displaying the trap status
      2. 7.7.2 VSAM KSDS data trap features
    8. 7.8 VSAM trace enhancement
      1. 7.8.1 New hook points
      2. 7.8.2 Control blocks traced
      3. 7.8.3 Starting the trace
    9. 7.9 Related publications
      1. 7.9.1 IBM manuals and sources of relevant information
      2. 7.9.2 VSAM information on the Internet
  12. Appendix A. Sample code
    1. JRIO API examples
    2. Accessing the VSAM Shared Information (VSI)
    3. Sample programs extract from SMF record type 64
    4. REXX code to list compression ratio
    5. GTF procedure example
  13. Appendix B. Miscellaneous performance items
    1. DASD cache concepts
    2. Symptoms and messages from a broken data set
    3. IDCAMS EXAMINE messages
  14. Related publications
    1. IBM Redbooks
    2. Other publications
    3. Online resources
    4. How to get Redbooks
    5. Help from IBM
  15. Back cover

Product information

  • Title: VSAM Demystified
  • Author(s): Mary Lovelace, Jose Dovidauskas, Alvaro Salla, Valeria Sokal
  • Release date: August 2022
  • Publisher(s): IBM Redbooks
  • ISBN: 0738437433