VSAM Demystified
Total Page:16
File Type:pdf, Size:1020Kb
Front cover VSAM Demystified Learn the latest VSAM functions and manage VSAM data Understand, evaluate, and use VSAM properly Learn problem determination and recommendations Mary Lovelace Jose Dovidauskas Alvaro Salla Valeria Sokal ibm.com/redbooks International Technical Support Organization VSAM Demystified March 2013 SG24-6105-02 Note: Before using this information and the product it supports, read the information in “Notices” on page xi. Third Edition (March 2013) This edition applies to z/OS Version 1 Release 13 DFSMS (product number 5694-A01). © Copyright International Business Machines Corporation 2001, 2012, 2013. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents Notices . xi Trademarks . xii Preface . xiii The team who wrote this book . xiii Now you can become a published author, too! . xiv Comments welcome. xiv Stay connected to IBM Redbooks . xiv Summary of changes. xvii March 2013, Third Edition . xvii Chapter 1. VSAM basics . 1 1.1 VSAM functions by release level. 2 1.2 What is VSAM? . 4 1.2.1 What is an access method? . 4 1.2.2 VSAM access types . 4 1.3 VSAM functions. 5 1.3.1 Catalog management . 5 1.3.2 Record management . 5 1.4 VSAM terminology and concepts . 5 1.4.1 Logical record . 5 1.4.2 Physical record . 8 1.4.3 Control interval . 10 1.4.4 Spanned records. 11 1.4.5 Control area . 12 1.4.6 Components . 13 1.4.7 Clusters. 15 1.4.8 Alternate indexes . 15 1.4.9 Sphere . 17 1.4.10 Splits . 17 1.4.11 VSAM buffering. 18 1.4.12 String multiprocessing. 18 1.4.13 Catalog Search Interface . 18 1.4.14 Extended Address Volume . 18 1.5 VSAM data set organizations . 19 1.5.1 Key-sequenced data set (KSDS) . 20 1.5.2 Entry-sequenced data set . 28 1.5.3 Relative record data set . 29 1.5.4 Variable relative record data set . 31 1.5.5 Linear data set . 31 1.5.6 Comparing VSAM data set organizations . 33 1.5.7 Selecting a VSAM data set type . 33 1.6 Data striping . 35 1.7 Processing a VSAM data set . 36 1.7.1 Defining VSAM data sets . 37 1.7.2 Allocating a VSAM data set . 38 1.7.3 Opening a VSAM data set . 38 1.7.4 Accessing VSAM data set. 39 © Copyright IBM Corp. 2001, 2012, 2013. All rights reserved. iii 1.7.5 Unallocation . 40 1.8 VSAM exploiters . 40 1.8.1 DB2 . 41 1.8.2 zSeries file system . 41 1.8.3 Hierarchical file system . 41 1.8.4 CICS . 42 1.8.5 DFSMShsm. 42 1.8.6 DFSMSrmm . 42 1.8.7 Java Record I/O (JRIO). 42 Chapter 2. Managing your VSAM data sets . 45 2.1 Reorganization considerations . 46 2.1.1 Reorganizing because of lots of CI/CA splits . 46 2.1.2 Reorganizing because of loss of useful space in data CA . 47 2.1.3 DB2 table space reorganization . 50 2.2 Sharing VSAM data sets . 50 2.2.1 Integrity . 51 2.2.2 Sharing VSAM data sets. 52 2.2.3 Write and read integrity. 53 2.2.4 VSAM sharing mechanisms . 54 2.2.5 Sharing data in a single VSAM control block structure . 58 2.2.6 Sharing data with many VSAM control block structures . 60 2.2.7 General share options considerations. ..