270 likes | 837 Views
Virtual Storage Access Method. Access 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
E N D
Virtual Storage Access Method • Access 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 in virtual storage
Terminology • Files or data sets familiar concepts • VSAM files referred to a a cluster • Need to DEFINE CLUSTER when defining VSAM files • Requires no special COBOL coding • Except for little used VSAM sequential files
Virtual Storage Access Method – VSAM – Dataset Types • Entry-sequenced – ESDS • Stored in order written may/not be ordered by a key field • Non-VSAM sequential datasets just as efficient • ASSIGN clause requires AS-ddname
Virtual Storage Access Method – VSAM- Dataset Types • Key-sequenced – KSDS • Consists 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 – RRDS • Records accessed by relative record numbers • Can be accessed Sequentially or Randomly
VSAM Record Management • Integrated Catalog Facility – ICF • Used to keep track of files on the system • There is one Master Catalog • Can be many User Catalogs • Access Method Services – general purpose VSAM file management program • IDCAMS
VSAM Record Management • Control Intervals • Used to store in fixed length blocks of Logical records • All physical I/O is carried out at the Control Interval level • Control Intervals exist within Control Areas • CA is usually one cylinder on the disk • Free space can be allocated to both CA and CI • VSAM uses the free space when adding new records
ICF - The relationships among the master catalog, user catalogs, and data sets
VSAM datasets are referred to a clusters Records are grouped together in control intervals, and control intervals are grouped together in control areas
The structure of a control interval – for fixed length records 10 bytes is reserved for Control Information
Control Interval Size Match your record size to valid sizes for control intervals – that will maximize storage efficiency
Free space distribution in the data component of a KSDS Need to Insert record 6047
Free space used to insert a record in the data component of a KSDS Need to insert record 6046 ??
Free space used to insert a record in the data component of a KSDS VSAM will split the control area if needed Records are always kept in physical sequence
Next Time Access Method Services