54 IMS Performance and Tuning Guide
5.1 Access methods
IMS has several access methods for storing data. Each has its own attributes and uses.
Some methods perform better if the application is sequentially reading the data; others
perform better if the application randomly accesses the data. Choosing the right access
method is important to the overall performance of the database.
When creating the IMS database descriptor (DBD), you have a few options to choose from to
select your database access method. The database access method defines to IMS how the
program processes the segments. In general, you base the access method chosen on the
application requirements. Below are the types of IMS databases.
Hierarchical sequential access method
Hierarchical sequential access method (HSAM), which can use either BSAM or QSAM, has
the following attributes:
򐂰 Like a flat or sequential file
򐂰 Must process in sequential, top to bottom, left to right, and front to back sequence
򐂰 No direct access to root segments
򐂰 Can have many levels of segments
򐂰 Can perform GU, GN, and GNP calls
򐂰 ISRT call allowed only when database is loaded
򐂰 Database update done by merging databases and writing new database
򐂰 Not used in IMS online environment
Simple hierarchical sequential access method
Simple hierarchical sequential access method (SHSAM), which can use either BSAM or
QSAM, has the following attributes:
򐂰 This database structure must be a root only database.
򐂰 Same as HSAM.
򐂰 Not used in IMS online environment.
Hierarchical indexed sequential access method
Hierarchical indexed sequential access method (HISAM), which uses VSAM, has the
following attributes:
򐂰 Direct access to root segments but access to dependent segments is sequential through
displacements.
򐂰 Simple database structures: a root and under six children.
򐂰 Used when deletion of segments is minimal.
򐂰 Used when there are lots of roots and very few children.
򐂰 Good access method for tables when data remains the same, or when very few updates
are done.
򐂰 Used when inserts are few.
򐂰 Used when database records, (a root and all its children), are the same length.
򐂰 All DL/I calls allowed.
򐂰 Can be used in IMS online environment.
򐂰 There are two bytes of segment prefixes: the segment code and the delete byte.
򐂰 The DBD is not used to define the CI size or free space; the VSAM delete define
statements take care of that function.
Chapter 5. Database performance 55
򐂰 VSAM size limit = 4 294 967 296 bytes (4 gigabyte limit).
Simple hierarchical indexed sequential access method
Simple hierarchical indexed sequential access method (SHISAM), which uses VSAM, has the
following attributes:
򐂰 This database structure must be a root only database.
򐂰 No segment prefix.
򐂰 Same as HISAM.
򐂰 VSAM size limit = 4 294 967 296 bytes (4 gigabyte).
Generalized sequential access method
Generalized sequential access method (GSAM), which can use QSAM/BSAM or VSAM, has
the following attributes:
򐂰 Like a flat or sequential file
򐂰 Has no hierarchy, database records, segments, or keys
򐂰 Used only for batch or BMP checkpoint/restart processing
򐂰 Not used in IMS online environment
򐂰 Can reposition to a specific block/record through restart
򐂰 Can perform GU, GN, and ISRT calls
Hierarchical direct access method
Hierarchical direct access method (HDAM), which can use OSAM or VSAM, has the following
attributes:
򐂰 Direct access to root segments but access to dependent segments can also be direct
through the use of pointers.
򐂰 Root segments are not physically stored in root ascending key sequence but are stored in
a random order, that is, if you perform an unqualified GN on the root segment of the HDAM
database, the sequence of the roots is 123, 001, 077, 078, 415, 002, and so on.
򐂰 Can be used in IMS online environment.
򐂰 Usually, it requires one I/O to get to the root segment.
򐂰 Complex database structures.
򐂰 Segment prefix: segment code, delete byte, and pointers.
򐂰 Default pointers are physical twin forward (PTF) and physical child first (PCF).
򐂰 CI size is determined in the define cluster, not in the DBD if VSAM.
򐂰 FREESPACE is determined in the primary DBD, not the define cluster.
򐂰 FREESPACE is determined in the define cluster, not in the DBD for secondary indexes
along with CI size.
򐂰 OSAM size limit = 85 899 345 920 bytes (80 gigabytes [8 GB limit per data set, 10 data
sets max]).
򐂰 VSAM size limit = 42 949 672 960 bytes (40 gigabytes [4 GB limit per data set, 10 data
sets max]).
Partitioned hierarchical direct access method
Partitioned hierarchical direct access method (PHDAM), which can use OSAM or VSAM, has
the following attributes:
򐂰 Same as HDAM.
򐂰 Partition on a key (by high key or a substring of the root key).

Get IMS Performance and Tuning Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.