Sie sind auf Seite 1von 22

IMS Hierarchic Access Methods

Unit 3

Copyright IBM Corporation 2008 Course materials may not be reproduced in whole or in part without the prior written permission of IBM.

5.1

Objectives
Identify the principal IMS access methods, their similarities and their differences Discuss the application requirements which dictate the choice of an access method

Copyright IBM Corporation 2008

IMS Hierarchic Access Methods


Basic: Access Method is Transparent to Program
HSAM: HISAM: HDAM: PHDAM: HIDAM: PHIDAM: Hierarchic Sequential Hierarchic Indexed Sequential Hierarchic Direct Partitioned Hierarchic Direct Hierarchic Indexed Direct Partitioned Hierarchic Indexed Direct Simple Hierarchic Sequential Simple Hierarchic Indexed Sequential Generalized Sequential Data Entry Database

Specialized: z/OS-compatible
SHSAM: SHISAM: GSAM:

Fast Path:
DEDB:

Copyright IBM Corporation 2008

Physical Storage (1 of 2)
HIERARCHIC SEQUENTIAL (HS): HSAM
INDEX
VSAM QSAM VSAM KSDS VSAM ESDS

HISAM

DATA

DATA

DATA

HIERARCHIC DIRECT (HD): HDAM / PHDAM


VSAM ESDS OR OSAM

HIDAM / PHIDAM
INDEX
VSAM KSDS VSAM ESDS OR OSAM

DATA KEY

DATA

SEQUENTIAL: GSAM
VSAM ESDS OR BSAM

DATA
Copyright IBM Corporation 2008

Physical Storage (2 of 2)
Sequential - Segments are related by physical adjacency
A 1 A 2 B 11 B 1 B 12 C 21 C 11 C 22 C 12 D 21 C 31 D 22 D 11 D 21 D 12 D 22 D 13 D 23

A 3

B 31

C 31

C 32

C 33

C 34

C 35

C 36

C 37

Direct - Segments are related by pointers


A 1 B 11 B 12 C 11 C 12 C 13 D 11 D 12 D 13

A B C D
Copyright IBM Corporation 2008

HD Pointers

HDAM/ PHDAM

HIDAM/PHIDAM

SEGMENT PREFIX DATA

Segment code Delete byte S C D B POINTER AREA

DATA

Physical Child Pointers


Physical Twin Pointers
Copyright IBM Corporation 2008

Hierarchic Database Records

COURSE C 1

COURSE C 2

CLASS L 11

CLASS L 21

L 22

INSTRUCT I 11 12 13

STUDENT S 11 12 13 14 15 16 17

INSTRUCT I 21 22

STUDENT S 21 22 23

24
25 26 27 28 29 30

Copyright IBM Corporation 2008

HSAM Storage Format


BSAM QSAM

C 1

L 11

I 11

I 12

I 13

S 11

S 12

S 13

S 14

S 15

S 16

S 17

C 2

L I I 21 21 22

S 21

S 22

S 23

S S S 24 25 26

S 27

S S 28 29

S L 30 22

...

C n

L n

I n

S n

S n

Copyright IBM Corporation 2008

HISAM Storage Format


VSAM INDEX

KSD S

ESDS

C 1

L 11

I 11

I 12

I 13

S 11

0 12

S 13

S 14

S 15

S 16

S 17

C 2

L 21

I 21

I 22

S 21

S 22

S 23

S 24

S 25

S 26

S 27

S 28

S 29

C n

L n

I n

S n

S n

S 30

L 22

Copyright IBM Corporation 2008

HISAM Summary
Direct access to a database record is via a root key index built and maintained by VSAM
INDEX

C 1

L 11

I 11

I 12

I 13

S 11

Segments of a database record are related by physical adjacency

C 1

L 11

I 11

I 12

I 13

S 11

Space of deleted segments is not reusable until reorganization


Inserts require movement of data
I 10 C 1 L 11 I 11 I 12 I 13 S 11

C 1

L 11

I 11

I S 13 11

C 1

L 11

I 10

I 11

I 12

I 13

Numerous inserts and deletes can degrade performance


C 1 L I 11 11 I 13
Copyright IBM Corporation 2008

S 14

S 15

S 16

S 17

HDAM/PHDAM Storage Format


KEY
ESDS / OSAM
Control Interval or Block RESERVED (VSAM)

BIT MAP

RANDOMIZER
C 7 L I S S S 71 71 71 72 73

C 2

L I I S S S 21 21 22 21 22 23

CONTROL INTERVAL and POINTER

S 24

S 25

Copyright IBM Corporation 2008

HDAM/PHDAM Summary
Access to a database record is through a root segment via a randomizing module
ROOT KEY RANDOMIZER C 1

...

...

Segments of a database record related by direct pointers


C 1 L 11 I 11 I 12 I S 13 11

Segments, once stored, never move

Space of deleted segments is immediately reusable 1

L 11

I 12

S 11

Uses: Primarily direct application processing requiring fast access to the root

C 1

L 11

I 12

S 11

Copyright IBM Corporation 2008

HIDAM/PHIDAM Storage Format


ESDS / OSAM VSAM INDEX
Control Interval

RESERVED (VSAM) KSDS

Control Interval

BIT MAP

C1 KEY

C2 KEY

C 1

L I I I S S 11 11 12 13 11 12

S S 13 14

C 2

L I I S 21 21 22 21

S S S S 22 23 24 25

Copyright IBM Corporation 2008

HIDAM/PHIDAM Summary
Direct access to a database record is via:
a root key index built and maintained by VSAM a direct pointer maintained by IMS
ROOT KEY INDEX C 1 ...

Segments of a database record related by direct pointers


C 1 L 11 I 11 I 12 I 13 S 11

Segments, once stored, never move

C 1

L 11

I 12

S 11

Space of deleted segments is immediately reusable


C 1 L 11 I 12 S 11

Uses: Applications with both sequential and direct needs


Large numbers of segments within the database record Large volume of insert and/or delete activity
Copyright IBM Corporation 2008

High Availability Large Data Base (HALDB)


A
DB Name=MASTER TYPE=HDAM Master DB Name: MASTER TYPE=PHDAM Partitions: PART1, PART2, PART3

C A D

E
B

DS1

DS2

ILDS

Part 1

ILDS A B ILDS

Part 2
Copyright IBM Corporation 2008

Part 3

HALDB - What Is It?


Large Databases
Databases are partitioned
Up to 1001 partitions per database Partitions have up to 10 data set groups Partition definition separated from database structure definition Allocation, authorization, reorganization and recovery by partition Reorganization of partition does not require changes to indexes or logically related databases which point to the partition 1 data set - secondary index data set 2 minimum/11 maximum - 1 for data, 1 for indirect list data set

High Availability Databases


Partition Independence

Self-Healing pointers

Partitioned Database Data Sets


PSINDEX
PHDAM

PHIDAM

3 minimum/ 12 maximum - 1 for data, 1 for indirect data set, 1 for primary index data set
Copyright IBM Corporation 2008

HALDB Characteristics
New Indirect Pointer Scheme
Indirect List Data Set (ILDS) Indirect List Entry (ILE)

Database Structure Changes


Each partition has a unique partition ID (PID) within a database Reorganization number is maintained in each partition Each segment is assigned a unique token called Indirect List Entry Key (ILK) Extended Pointer Set (EPS) allows use of indirect pointer scheme

Partition Selection
During DL/I call processing via a user defined High Key for each partition Via a user defined Partition Selection Exit and String Value

Copyright IBM Corporation 2008

Migration Considerations
All logically related databases must be migrated concurrently Logical child segments cannot be initially loaded Secondary indexes must also be migrated Secondary index for partitioned database is created during initial load Partitioned database data sets are dynamically allocated without DFSMDA members Prefix Resolution and Prefix Update utility processing are not applicable Virtual pairing logical relationship is not supported Updates in the ILDS are not logged DBRC registration is required

Copyright IBM Corporation 2008

Hierarchic Summary
Which IMS access method ? Identify the type of processing for each database
Direct Sequential Both

The "volatility" of the data The "variability" of the database record length

Copyright IBM Corporation 2008

GSAM
COURSE C n

ESDS / BSAM

CLASS C n

RECORD 1

RECORD 2

INSTRUCT I n

STUDENT S n n n

RECORD 2 CONT

REC 3

REC

ORD 4

...

Simple Non-Hierarchic data set

Used mostly to ease restart process


More later in this class.
Copyright IBM Corporation 2008

IMS Database Tools


IMS Hardware Data Compression Extended Fast Path Basic Tools
DEDB Pointer Checker DEDB Tuning Aid DEDB Unload/Reload

Fast Path Online Tools


Online Pointer Checker Online Data Extract Online Area Extender

IMS Buffer Pool Analyzer HALDB Conversion and Maintenance Aid IMS Database Repair Facility IMS DEDB Fast Recovery IMS Database Recovery Facility
follow-on product to ORS

IMS Database Control Suite High Performance Unload High Performance Load IMS Index Builder IMS High Performance Prefix Resolution IMS Parallel Reorganization IMS Image Copy Extensions IMS High Performance Change Accumulation High Performance Pointer Checker
HD Pointer Checker HD Tuning Aid DB Segment Restructure Space Monitor DB Historical Data Analyzer DBD/PSB/ACB Compare DBD/PSB/ACB Mapper DBD/PSB/ACB Reversal Advanced ACB Generator

IMS Library Integrity Utilities


Copyright IBM Corporation 2008

Unit Summary
The similarities and differences in the principal types of IMS access methods were identified. The general application requirements which dictate the choice of access methods were learned.
Sequential Direct or Mixed Non-Hierarchic - HSAM and HISAM - HDAM/PHDAM and HIDAM/PHIDAM - GSAM

Tools used to work with IMS databases were identified

Copyright IBM Corporation 2008

Das könnte Ihnen auch gefallen