ch08 vsam slides
TRANSCRIPT
-
8/3/2019 Ch08 VSAM Slides
1/25
VSAM conceptsand terminology
-
8/3/2019 Ch08 VSAM Slides
2/25
Virtual Storage Access MethodAccess Method Interface between application program and
Operating System Facilitates data access
VSAM Most widely used access method on IBM
mainframes Designed to operate in a virtual storage
environment
Handles all I/O requests to Operating System
No physical I/O is done if record is all ready invirtual storage
-
8/3/2019 Ch08 VSAM Slides
3/25
Terminology
Files or data sets familiar concepts
VSAM files referred to a a cluster
Need to DEFINE CLUSTER when definingVSAM files
Requires no special COBOL coding
Except for little used VSAM sequentialfiles
-
8/3/2019 Ch08 VSAM Slides
4/25
Virtual Storage Access Method
VSAM Dataset Types
Entry-sequenced ESDSStored in order written may/not be
ordered by a key fieldNon-VSAM sequential datasets just asefficient
ASSIGN clause requires AS-ddname
-
8/3/2019 Ch08 VSAM Slides
5/25
Virtual Storage Access Method
VSAM- Dataset Types
Key-sequenced KSDSConsists of two parts
Index containing key and pointer to record
location
Data records stored in primary key sequence
Can be accessed Sequentially or Randomly
Significant improvement over legacy ISAM files
Relative-record
RRDSRecords accessed by relative record numbers
Can be accessed Sequentially or Randomly
-
8/3/2019 Ch08 VSAM Slides
6/25
An employee file with Entry-sequenced (ESDS)organization
-
8/3/2019 Ch08 VSAM Slides
7/25
An employee file with key-sequenced (KSDS ) organization
-
8/3/2019 Ch08 VSAM Slides
8/25
Relative Record Data Set (RRDS)
-
8/3/2019 Ch08 VSAM Slides
9/25
VSAM Record Management
Integrated Catalog Facility ICF
Used to keep track of files on thesystem
There is one Master Catalog
Can be many User Catalogs
Access Method Services general
purpose VSAM file managementprogram
IDCAMS
-
8/3/2019 Ch08 VSAM Slides
10/25
VSAM Record ManagementControl Intervals Used to store in fixed length blocks of Logical
records All physical I/O is carried out at the Control
Interval levelControl Intervals exist within ControlAreas CA is usually one cylinder on the disk
Free space can be allocated to both CAand CI VSAM uses the free space when adding new
records
-
8/3/2019 Ch08 VSAM Slides
11/25
ICF - The relationships among the master catalog,
user catalogs, and data sets
-
8/3/2019 Ch08 VSAM Slides
12/25
VSAM datasets are referred to a clusters
Records are grouped together in control intervals, andcontrol intervals are grouped together in control areas
-
8/3/2019 Ch08 VSAM Slides
13/25
-
8/3/2019 Ch08 VSAM Slides
14/25
The structure of a control interval
for fixed lengthrecords 10 bytes is reserved for Control Information
-
8/3/2019 Ch08 VSAM Slides
15/25
Match your record size to valid sizes for controlintervals that will maximize storage efficiency
Increments of 512 Increments of 2048
(Up to 8192 bytes) (Over 8192 bytes)512 4608 10240 26624
1024 5120 12288 286721536 5632 14336 307202048 6144 16384 327682560 6656 184323072 7168 204803584 7680 225284096 8192 24576
Assume a record size of 300 bytes300 / 4086 = 13 records 3900/4086 = 95%
Control Interval Size
-
8/3/2019 Ch08 VSAM Slides
16/25
Record organization
in an ESDS
-
8/3/2019 Ch08 VSAM Slides
17/25
Components of a key-sequenced data set
-
8/3/2019 Ch08 VSAM Slides
18/25
Accessing a record in a key-sequenced data set
-
8/3/2019 Ch08 VSAM Slides
19/25
Free spacedistribution in thedata component ofa KSDS
Need to Insertrecord 6047
-
8/3/2019 Ch08 VSAM Slides
20/25
Free space used toinsert a record in
the data componentof a KSDS
Need to insertrecord 6046 ??
-
8/3/2019 Ch08 VSAM Slides
21/25
Free space used to
insert a record inthe data component
of a KSDS
VSAM will split thecontrol area ifneeded
Records are alwayskept in physicalsequence
-
8/3/2019 Ch08 VSAM Slides
22/25
VSAM supports alternate indices with unique keys
-
8/3/2019 Ch08 VSAM Slides
23/25
VSAM supports alternate indices with non-uniquekeys
-
8/3/2019 Ch08 VSAM Slides
24/25
Next Time
Access Method Services
-
8/3/2019 Ch08 VSAM Slides
25/25