82 IMS Performance and Tuning Guide
block.” Generally, this is the block that contains the segment or RAP from which the inserted
segment will be chained. Exceptions are explained in the “How the HD Space Search
Algorithm Works” section of the IMS Version 9: Administration Guide: Database Manager,
SC18-7806, manual. If IMS does not find space in this block, it uses the HD space search
algorithm to find space in another block. In general, the algorithm tries to find space in a
nearby block on the same cylinder. If it does not find available space there, the SCAN
parameter limits the number of adjacent cylinders that IMS examines when it looks for space.
If IMS does not find space within this limit, it inserts the segment at the end of the data set.
SCAN=0 causes IMS to search for blocks in the buffer pool which are on the cylinder
containing the most desirable block. SCAN=1 causes IMS to scan the pool for blocks on the
two adjacent cylinders also. SCAN=2 causes IMS to scan the pool for blocks on the two
cylinders which are on either side of the cylinder containing the most desirable block. IMS
must scan its buffer pool once for each cylinder within the scan range. So with SCAN=3, IMS
might scan the buffer pool seven times, once for each cylinder within the limit.
You should always specify SCAN=0. The default is SCAN=3. The default was set many years
ago when cylinders were much smaller and buffers pools contained fewer buffers. Today, a
3390 cylinder holds over 0.5 megabytes, and many buffer pools have thousands of buffers.
Multiple scans of these pools can be costly. In any case, there is no particular advantage in
putting the segment two or three cylinders away. It can just as easily be handled when placed
at the end of the data set.
You cannot specify SCAN for HALDB databases. The space search algorithm for them always
operates as though SCAN=0 were specified.
Recommendation summary for the SCAN parameter
Always specify SCAN=0 on DATASET statements for HDAM and HIDAM databases.
5.11 Multiple data set groups
PHDAM, PHIDAM, HDAM, and HIDAM databases can have multiple data set groups. You can
use multiple data set groups to store different segment types in different data sets. You can
store multiple segment types in the same data set, but all instances of the same segment type
are stored in the same data set. Figure 5-4 on page 83 is an illustration of the use of multiple
data set groups.

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.