The Complete IMS HALDB Guide
The Complete IMS HALDB Guide
The Complete IMS HALDB Guide
Jouko Jäntti
Cornelia Hallmen
Raymond Keung
Rich Lewis
ibm.com/redbooks
International Technical Support Organization
June 2003
SG24-6945-00
Note: Before using this information and the product it supports, read the information in
“Notices” on page xi.
This edition applies to IMS Version 7 (program number 5655-B01) and IMS Version 8 (program
number 5655-C56) or later for use with the OS/390 or z/OS operating system.
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xii
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
The team that wrote this redbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv
Comments welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
iv The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
5.1 Using the batch interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.2 DBRC initialization commands for HALDB . . . . . . . . . . . . . . . . . . . . . . . . 62
5.2.1 INIT.DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.2.2 INIT.PART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.3 DBRC change commands for HALDB. . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
5.3.1 CHANGE.DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.3.2 CHANGE.PART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.3.3 CHANGE.DBDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70
5.4 DBRC delete commands for HALDB. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.4.1 DELETE.DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.4.2 DELETE.PART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Part 2. Migration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
Contents v
8.3.5 Defining the partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97
8.3.6 Allocating database data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98
8.3.7 Initializing the partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
8.3.8 Reloading the HALDB database . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
8.3.9 Image copying the database data sets . . . . . . . . . . . . . . . . . . . . . . 100
8.4 ILDS creation options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100
8.4.1 HD Reload with no control statement . . . . . . . . . . . . . . . . . . . . . . . 100
8.4.2 HD Reload with an ILDSMULTI control statement . . . . . . . . . . . . . 100
8.4.3 HD Reload with a NOILDS control statement . . . . . . . . . . . . . . . . . 101
8.5 Migrating databases with secondary indexes . . . . . . . . . . . . . . . . . . . . . 101
8.5.1 Changing DBDs for secondary indexes . . . . . . . . . . . . . . . . . . . . . 102
8.5.2 Estimating the sizes of secondary index partitions . . . . . . . . . . . . . 107
8.5.3 Unloading databases with secondary indexes . . . . . . . . . . . . . . . . 109
8.5.4 Allocating secondary index data sets . . . . . . . . . . . . . . . . . . . . . . . 111
8.5.5 Loading databases and their secondary indexes . . . . . . . . . . . . . . 111
8.5.6 Secondary index pointers after the migration . . . . . . . . . . . . . . . . . 113
8.5.7 Using MIGRATE=YES with secondary indexes . . . . . . . . . . . . . . . 113
8.6 Migrating databases with logical relationships . . . . . . . . . . . . . . . . . . . . 114
8.6.1 Changing DBDs with logical relationships. . . . . . . . . . . . . . . . . . . . 114
8.6.2 Changing DBDs with logical relationships. . . . . . . . . . . . . . . . . . . . 115
8.6.3 Unloading logically related databases for migration . . . . . . . . . . . . 118
8.6.4 Loading logically related databases for migration . . . . . . . . . . . . . . 119
8.6.5 Logical relationship pointers after the migration . . . . . . . . . . . . . . . 119
8.7 Migrating from PDB or PDF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
8.7.1 Partition selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
8.7.2 DBD changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
8.7.3 Using standard IMS utilities for the migration . . . . . . . . . . . . . . . . . 121
8.7.4 Using application programs for the migration . . . . . . . . . . . . . . . . . 121
8.7.5 Using PSU Unload and application programs for the migration . . . 122
8.8 Migrating from user partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
8.8.1 Using application programs for the migration . . . . . . . . . . . . . . . . . 123
8.8.2 Using HD Unload and application programs for the migration . . . . 125
8.8.3 Warning on the use of HD Reload . . . . . . . . . . . . . . . . . . . . . . . . . 126
8.9 Fallback to non-HALDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
8.9.1 Fallback with secondary indexes . . . . . . . . . . . . . . . . . . . . . . . . . . 127
8.9.2 Fallback with logical relationships . . . . . . . . . . . . . . . . . . . . . . . . . . 127
vi The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
9.1.5 Deleting the database from the RECONs . . . . . . . . . . . . . . . . . . . . 137
9.1.6 Changing the DBD and running the DBDGEN . . . . . . . . . . . . . . . . 138
9.1.7 Defining partitions with PDU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
9.1.8 Allocate HALDB data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
9.1.9 Initializing HALDB partitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
9.1.10 Loading HALDB database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141
9.1.11 Image copy HALDB data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
9.1.12 ACBGEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
9.2 Migration of a database with a secondary index . . . . . . . . . . . . . . . . . . . 142
9.3 Migrating a PDB database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
Chapter 10. Using the HALDB Conversion and Maintenance Aid . . . . . 151
10.1 HALDB Conversion and Maintenance Aid product . . . . . . . . . . . . . . . . 152
10.1.1 The conversion process overview . . . . . . . . . . . . . . . . . . . . . . . . . 153
10.2 Activating the tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154
10.2.1 Modifying the startup CLIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
10.2.2 Allocating the environment description data set . . . . . . . . . . . . . . 155
10.3 Migration example with HALDB Conversion tool. . . . . . . . . . . . . . . . . . 155
10.3.1 Define an IMS environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
10.3.2 Define a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 164
10.3.3 Process a conversion project . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168
10.4 Additional functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
Contents vii
11.5 Processing secondary indexes as databases . . . . . . . . . . . . . . . . . . . . 198
11.5.1 Secondary indexes with /SX fields . . . . . . . . . . . . . . . . . . . . . . . . 199
11.5.2 Secondary indexes with symbolic pointers . . . . . . . . . . . . . . . . . . 202
11.6 Handling test environments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
11.6.1 DBRC registration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
11.6.2 Testing with non-HALDB databases . . . . . . . . . . . . . . . . . . . . . . . 206
11.7 Copying databases to different environments . . . . . . . . . . . . . . . . . . . . 207
11.7.1 The partition ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
11.7.2 Using image copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207
11.7.3 Using unloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
11.7.4 Copying part of the data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
11.7.5 Copying partition definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
11.7.6 Timestamp recoveries to a copy . . . . . . . . . . . . . . . . . . . . . . . . . . 208
11.7.7 Planned enhancement for copying partition definitions. . . . . . . . . 209
viii The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Chapter 13. Backup and recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227
13.1 Backup and recovery overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
13.2 Image copies for HALDB data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
13.2.1 Database Image Copy utility (DFSUDMP0) example . . . . . . . . . . 229
13.2.2 Database Image Copy 2 utility (DFSUDMT0) example. . . . . . . . . 229
13.2.3 Using GENJCL to create image copy JCL . . . . . . . . . . . . . . . . . . 230
13.3 Recoveries of HALDB data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
13.3.1 Change Accumulation utility with HALDB . . . . . . . . . . . . . . . . . . . 231
13.3.2 Database Recovery utility and ORS with HALDB . . . . . . . . . . . . . 231
13.4 Rebuilding ILDS and PHIDAM index data sets . . . . . . . . . . . . . . . . . . . 236
13.4.1 Performance of the Index/ILDS Rebuild utility . . . . . . . . . . . . . . . 237
13.4.2 Using GENJCL.USER to generate Index/ILDS Rebuild JCL . . . . 238
13.5 Recovering HALDB secondary index data sets . . . . . . . . . . . . . . . . . . 239
13.5.1 Using IMS Index Builder for recoveries . . . . . . . . . . . . . . . . . . . . . 241
13.6 Batch Backout utility with HALDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
Contents ix
Chapter 16. Using IMS tools for HALDB . . . . . . . . . . . . . . . . . . . . . . . . . . 271
16.1 IMS High Performance Unload . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
16.2 IMS High Performance Load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273
16.3 IMS Index Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
16.4 IMS Image Copy Extensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
x The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult
your local IBM representative for information on the products and services currently available in your area.
Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product, program, or service that
does not infringe any IBM intellectual property right may be used instead. However, it is the user's
responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document.
The furnishing of this document does not give you any license to these patents. You can send license
inquiries, in writing, to:
IBM Director of Licensing, IBM Corporation, North Castle Drive Armonk, NY 10504-1785 U.S.A.
The following paragraph does not apply to the United Kingdom or any other country where such provisions
are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES
THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer
of express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made
to the information herein; these changes will be incorporated in new editions of the publication. IBM may
make improvements and/or changes in the product(s) and/or the program(s) described in this publication at
any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in any
manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the
materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products and cannot confirm
the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on
the capabilities of non-IBM products should be addressed to the suppliers of those products.
This information contains examples of data and reports used in daily business operations. To illustrate them
as completely as possible, the examples include the names of individuals, companies, brands, and products.
All of these names are fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrates programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs in
any form without payment to IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating platform for which the
sample programs are written. These examples have not been thoroughly tested under all conditions. IBM,
therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy,
modify, and distribute these sample programs in any form without payment to IBM for the purposes of
developing, using, marketing, or distributing application programs conforming to IBM's application
programming interfaces.
Partitioned Database Facility (PDF) is a trademark of Neon Enterprise Software, Inc. in the United States,
other countries, or both.
ActionMedia, LANDesk, MMX, Pentium and ProShare are trademarks of Intel Corporation in the United
States, other countries, or both.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the
United States, other countries, or both.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun
Microsystems, Inc. in the United States, other countries, or both.
C-bus is a trademark of Corollary, Inc. in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
SET, SET Secure Electronic Transaction, and the SET Logo are trademarks owned by SET Secure
Electronic Transaction LLC.
Other company, product, and service names may be trademarks or service marks of others.
xii The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Preface
This IBM Redbook describes the High Availability Large Database (HALDB)
capability available with IMS™. IMS HALDB was introduced with IMS Version 7.
It allows IMS databases to grow to almost unlimited sizes while providing
increased availability. This book updates IMS Version 7 High Availability Large
Database Guide, SG24-5751, as well as adds topics that were not covered in the
previous book.
This publication provides a broad explanation of HALDB and its uses. Specific
areas covered include:
HALDB overview, definition, and structure
Migration from non-HALDB databases
Application considerations
HALDB database administration
Jouko Jäntti is a Project Leader specializing in IMS with the IBM International
Technical Support Organization, San Jose Center. He holds a Bachelors degree
in Business Information Technology from Helsinki Business Polytechnic, Finland.
Before joining the ITSO in September 2001, Jouko worked as an Advisory IT
Specialist at IBM Global Services, Finland. Jouko has been working on several
e-business projects with customers as a specialist in IMS, WebSphere®, and
UNIX on the OS/390® platform. He has also been responsible for the local IMS
support for Finnish IMS customers. Prior to joining IBM in 1997, he worked as a
Systems Programmer and Transaction Management Specialist in a large Finnish
bank for 13 years, and was responsible for the bank's IMS systems.
Rose Levin, Becky Bard, Harley Beier, Claudia Ho, John Langley, Rick
Long, Elmer Rohde, Pete Sadler, Pat Schroeck, Larry Sullivan, Vern Watts
IBM Silicon Valley Laboratory, San Jose, USA
Christian Koeppen
Peck-Software, USA
Rick Long, Ken Daugherty, Jim Kelly, Geoff Nicholls, Norbert Theurich
The authors of IMS Version 7 High Availability Large Database Guide,
SG24-5751
Your efforts will help increase product acceptance and customer satisfaction. As
a bonus, you'll develop a network of contacts in IBM development labs, and
increase your productivity and marketability.
xiv The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Find out more about the residency program, browse the residency index, and
apply online at:
ibm.com®/redbooks/residencies.html
Comments welcome
Your comments are important to us!
Preface xv
xvi The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Part 1
Part 1 HALDB
overview
In this part we discuss the benefits of using HALDB databases. We identify which
databases are candidates for migration to HALDB. We describe the structure of
HALDB databases and their partitions. We explain how you define HALDB
databases and how to initialize their partitions. We describe the ways in which
HALDB can assign database records to partitions.
HALDB removes this limit by removing the restriction that all occurrences of the
same segment type must be in the same data set. HALDB groups database
records into sets of partitions. The hierarchic structure is maintained within a
partition and a whole database record always resides in a single partition.
Partitions may be very large. Each partition may have up to ten data sets. A
database may have up to 1001 partitions, so segments in a HALDB database
may be stored in up to 10,010 data sets. Each HALDB data set may be up to 4
GB, so a HALDB database may contain over 40 terabytes of data.
These benefits are delivered with application compatibility. Only in rare cases are
application programming changes required when a database is migrated to
HALDB.
4 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
1.2 Features and benefits
HALDB addresses a number of limitations associated with non-HALDB
full-function databases. Non-HALDB database limitations include:
Storage capacity for each database is limited by the maximum size of its data
sets. These sizes are 4 GB for VSAM and 8 GB for OSAM.
Limited options are available for increasing the storage capacity of a single
database.
Availability of the database is not granular. The entire database is either
available or unavailable.
Secondary index databases with direct pointers must be rebuilt when their
indexed databases are reorganized.
Logical relationships require updates to pointers in related databases when a
database is reorganized. Utility executions are required to make these
updates.
Increasing the size of a database requires the reorganization of the entire
database. This may require an extended outage.
The following list categorizes databases that are candidates for conversion to
HALDB:
Very large databases
The most obvious candidates for HALDB are the databases that are
approaching the 4 GB (VSAM) or 8 GB (OSAM) data set limitation. Their
conversion to HALDB provides for future growth and makes them more
manageable.
Previously partitioned databases
Some of these large databases already may have been partitioned with user
partitioning or by products like IMS/ESA® Partition Support Product (PDB).
These databases are also candidates for conversion to HALDB.
Databases benefitting from improved reorganization processes
HALDB partitioning provides faster reorganizations. This means that the
reorganizations may be done more frequently. The self-healing pointer
process for secondary indexes and logical relationship eliminates many of the
utilities associated with the reorganization of non-HALDB databases. This
simplifies their reorganization.
Databases benefitting from more free space
The virtually unlimited size of HALDB databases allows users to specify
increased free space. This may improve database performance and reduce or
eliminate the need to reorganize them.
6 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Databases benefitting from parallel processing
Parallel execution of application programs may access the same database. A
conversion of the database to HALDB simplifies this processing.
There are advantages to using HALDB even with only one partition:
The reorganization process for databases with secondary indexes and logical
relationships is shortened and simplified.
PHIDAM databases are more easily managed than HIDAM databases. The
primary index of a PHIDAM database is no longer a separate database.
If the database grows, space may be added by simply adding partitions.
Partition
Partition DATASET(s)
Information
Partition attributes set by PDU utility
High-key = AA
Information
Partition stored in the Recon
High-key = BB
Information
Partition
Partition
High-key = CC
Information
High-key = DD
Both databases and partitions may be controlled and displayed with online
commands. Commands used with non-HALDB databases, such as /START,
/STOP, and /DISPLAY, are also used with HALDB databases and partitions.
See Figure 1-2 on page 9 for an illustration of a database before and after
conversion to HALDB.
8 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
DB Name
DB Name = MAGIC
MAGIC HALDB Master DB
HALDB DB Name
Name = MAGIC
MAGIC
TYPE=HDAM
TYPE= HDAM TYPE=PHDAM
TYPE= PHDAM
Partitions: PART1,
Partitions: PART1, PART2,
PART2, PART3
PART3
M M
A G A G
I C I C
DS1 DS2
A B ILDS
PART1 A B ILDS
A B ILDS
PART2
PART3
When loading a new partitioned database that contains logical relationships, the
logical child segments may not be loaded as part of the load step. Logical
children are added by normal update processing after the database has been
loaded.
Partition selection is based either on the key ranges or a partition selection exit
routine. For batch, BMP, and JBP programs, a PCB can be restricted to access a
single partition.
10 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
1.7.2 Partition selection using a partition selection exit routine
Installations that prefer to select partitions by some criteria other than key ranges
may use a partition selection exit routine. The routine assigns records to
partitions based on the key of the root segment. It also determines the order in
which sequential processing accesses the partitions. We explain the
requirements and possibilities for these exit routines in 7.2, “Writing partition
selection exit routines” on page 82.
The primary index of a PHIDAM database is not separately defined. Its definition
is included with the definition of the database. Each partition of a PHIDAM
database has its own index data set.
Each partition of a PHDAM or PHIDAM has an indirect list data set (ILDS). The
ILDS is used for the self-healing pointer process. This process eliminates the
need to rebuild secondary indexes or resolve logical relationships when
databases are reorganized. We describe the process in 14.2, “The self-healing
pointer process” on page 251. It is only used for logical relationships and
secondary indexes.
HALDB uses direct pointers, such as physical child and physical twin pointers,
within PHDAM and PHIDAM databases. These are the same pointers that are
used with non-HALDB databases.
The partition ID and reorganization number are stored in the first data set of each
partition of the PHDAM and PHIDAM databases. This is the data set in which
root segments are stored. They are stored in the field of the first bit map block
that would otherwise hold the free space element anchor point (FSEAP).
Figure 1-3 shows the format of a HDAM or HIDAM segment and that of a
PHDAM or PHIDAM segment. The ILK is the last part of the prefix in the HALDB
segments. These HALDB segments always include a physical parent pointer in
the prefix of segments other than roots. Some non-HALDB segments also have
physical parent pointers. They are required in non-HALDB segments only when
the segment is the target of a logical relationship or secondary index or the
parent of such a segment. They may also be included by specifying the pointer in
the DBDGEN.
SC - segment code
DB - delete byte
ILK - indirect list key
Figure 1-3 HDAM, HIDAM, PHDAM, and PHIDAM segments
Figure 1-4 on page 13 shows the format of HDAM, HIDAM, PHDAM, and
PHIDAM logical child segments. HALDB logical child segments have an
extended pointer set (EPS) in their prefix. This replaces the RBA pointer, which
non-HALDB logical child segments have among their pointers. HALDB logical
12 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
child segments always have their logical parent’s concatenated key stored in the
data area. This is optional with non-HALDB logical child segments.
SC - segment code
DB - delete byte
LPCK - logical parent's concatenated key
EPS - extended pointer set
ILK - indirect list key
Figure 1-4 HDAM, HIDAM, PHDAM, and PHIDAM logical child segments
Secondary indexes
The prefix of non-HALDB secondary index segments has a four-byte RBA when
direct pointers are used. The prefix of HALDB secondary index segments
includes an EPS and the key of the target’s root segment. Figure 1-5 shows the
format non-HALDB (INDEX) secondary index segments and HALDB (PSINDEX)
secondary index segments.
PSINDEX segment
DB EPS Root Key Index Data
|------------------------Prefix----------------------------------|
DB - delete byte
EPS - extended pointer set
Figure 1-5 Secondary index segments
Each PHDAM or PHIDAM partition has an ILDS. The ILDS is required even when
there are no secondary indexes or logical relationships. Indirect list entries only
exist for segments involved in inter-record pointing. These are target segments of
secondary indexes or logical relationships. Secondary indexes do not have an
ILDS because they never contain any target segments.
Indirect list entries are created or updated only by reorganization reload. They
are not created or updated by non-reload processing. An initial load program
(PROCOPT=L) does not create any ILEs. After an initial load, the ILDS is empty.
If you insert a target segment during normal processing (PROCOPT=I or A), no
ILE will be created either. ILEs are not needed in these cases because inserts of
target segments create accurate pointers in the EPSs of the secondary index
entries or logical child segments.
The key to the ILE is a 9-byte field consisting of the indirect list key and the
segment code of the target segment. The ILK is also stored in the segment prefix
of the target segment. The next field contains flags (1 byte). ILE data contains an
old and a new copy (20 bytes each) of information needed for the self-healing
pointer process.
14 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
These are:
Partition ID
Reorganization number
RBA of logical parent or secondary index target segment
Database record lock ID for target segment
RBA of paired logical child when physical pairing is used
The data sets for data set groups are called data data sets. These data sets
contain the segment data for PHDAM and PHIDAM databases.
Figure 1-6 on page 16 shows the data sets for the different types of HALDB
databases.
1-1001 partitions
... ... up to 10
Data data sets
... ...
The maximum data set size is 4 GB. This applies to both OSAM and VSAM data
sets.
The key ranges for the partitions of a secondary index are not likely to match the
key ranges of its target database. Partition selection for the secondary index is
based on its key. Partition selection for the target database is based on its key.
Usually, these keys are unrelated. In Figure 1-7 on page 17 the target database
is partitioned on last name and the secondary index is partitioned on employee
number. You will notice that both partitions of the secondary index have target
segments in each of the partitions of the target database.
16 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
time. That is, you will not be able to do a timestamp recovery of an individual
partition for most databases that have secondary indexes.
Secondary Index
000-499 500-999
Target Database
A partition selection exit could be used to partition the secondary index along the
same boundaries of the main database. There has to be an appropriate key,
because the selection of a partition always depends on the root key. The exit has
the possibility to use just parts of the root key to define the correct partition.
1.9.2 DD names
DD names are constructed by appending a one-byte suffix to the partition name.
The suffix indicates the function of the data set.
For PSINDEX databases, there is only one data set in a partition: Suffix A is used
for the secondary index data set.
Thus, a partition in a PHIDAM database with partition name PART1 would have
DD names of PART1A for its first data data set, PART1B through PART1J for any
successive data data sets, PART1L for its ILDS, and PART1X for its primary
index data set.
A secondary index partition with partition name PARSI would have a DD name of
PARSIA for its data set.
18 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
There is no required correlation between the partition name and the names of its
data sets. You may assign the same data set name prefix for every partition in a
database. Since partition IDs are unique, data sets in different partitions will have
different data set names.
Some examples of databases that we use later in this publication are the
Customer database (CUSTDB) and the New Order database (NORDDB). In our
example the Customer database is PHDAM and has two partitions, and the New
Order database is PHIDAM and has two partitions. Table 1-1 shows the
corresponding DD and data set names. The example used may not be a practical
one for a real environment, as the partition names and DD names must be
unique within their RECON.
After ACBGEN and system definition for the master database, assignment of
data sets to buffer pools also must be done.
The master DBD provides the structure for DL/I processing, as well as a model
for creating the partitions.
The logical structure of the database includes the relationship between the
segments, the pointers used, the database access method (PHDAM or
PHIDAM), the segment layouts, the database physical data set organization
(VSAM or OSAM), and, if appropriate, any secondary indexes or logical
relationships. You should also decide whether you need data set groups. One
reason for data set groups is now obsolete. You do not need them to resolve size
problems, but they could still be helpful for resolving potential performance
problems.
22 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Other functions of DBDGEN for non-HALDB databases, such as defining the
physical characteristics of the data sets and their DDNAMEs, are not performed
for HALDB. You have to use other tasks to define them.
The HALDB Migration Aid utility (DFSMAID0) may help you in determining the
answers to some of these questions.
You have to decide how many partitions you want. Usually this is determined by
two considerations: The size of the database and the time required for the
reorganization of the database. Partitions may be reorganized independently and
in parallel. Since smaller partitions may be reorganized faster, defining many
small partitions allows you to reorganize the database in a shorter time.
When using key range partitioning we recommend that you specify a value of
x’FF’ for the last partition. This ensures that all keys may be assigned to a
partition. If the last partition (the partition with the highest key specified) has a
key value other than x’FF’s, any attempt to access or insert a database record
with a key higher than the high key specified results in an FM status code for the
call. Application programs written for non-HALDB databases are unlikely to
expect this status code.
These exit routines are not passed any information about partitions. Their actions
cannot be tailored for individual partitions.
24 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
2.1.6 System definition
The DATABASE macro statement is used to define physical databases for an
IMS online system. One DATABASE macro must be specified for each PHDAM,
PHIDAM, and PSINDEX database. Unlike HIDAM primary indexes, PHIDAM
primary indexes are not defined explicitly and DATABASE macros are not used in
the system definition. Instead, they are implicitly defined by the DATABASE
macro for the PHIDAM database.
Buffer subpools may be used for both HALDB and non-HALDB data sets. These
subpools are defined with IOBF statements for OSAM and VSRBF statements
for VSAM. They are not changed for HALDB support.
DBD statements are used to assign data sets to specific subpools. Example 2-1
shows the DBD statement format. The dbdname value is used to specify a
database or partition. For non-HALDB data sets, the data set identifier is a
number. This is the data set number within the database specified by the
dbdname value. For HALDB data sets, the data set identifier is a letter. This is the
letter associated with the type of data set. It is the same letter that is used for the
suffix in the data set’s DDNAME. A through J are used for data set groups. X is
used for PHIDAM primary indexes. L is used for ILDSs. A is used for secondary
indexes. The id value identifies the database subpool to which the data set is
assigned.
Buffer pools for ILDSs are always required when processing the PHDAM and
PHIDAM databases. This is true even when the ILDSs have no entries in them.
DBDGEN does not define individual partitions. This is done using the HALDB
Partition Definition utility or DBRC batch commands. See Chapter 4, “Partition
Definition utility” on page 45, and Chapter 5, “Batch definition of HALDB” on
page 61.
Definitions specified in the DBDGEN source will generally apply to all partitions.
The possible exception is the RMNAME parameter on the DBD statement.
RMNAME must be specified in the DBD for PHDAM databases, but it may be
overridden. Overrides may specify different values for different partitions.
The PSNAME parameter on the DBD statement specifies the name of a partition
selection exit routine. It may be overridden by the PDU or DBRC commands. The
26 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
override may specify a different name or may specify that key range partitioning
is to be used. Similarly, if the PSNAME parameter is not specified in the DBD, it
may be specified by the PDU or DBRC commands.
Table 2-1 shows the parameters that are changed or added to DBDGEN
statements.
DSGROUP This keyword is used to specify multiple data set groups for
(new) partitioned databases. The format is DSGROUP=c, where c is
the letters A through J. Up to 10 data set groups can be
specified. The DSGROUP value corresponds to the values
used in the DDNAME and data set naming conventions for
HALDB.
28 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Statement Keyword Description of change
LCHILD LCHILD statements are not used for the primary index of a
PHIDAM database. These indexes are automatically generated
by PHIDAM definitions.
RKSIZE For PSINDEX only, specifies the length of the root segment key
(new) of the target database.
FIELD Unchanged.
Note: /CK means the same as with non-HALDB. /SX creates an
8-byte ILK instead of 4-byte RBA.
XDFLD CONST For shared secondary indexes. Not allowed for HALDB.
Each HALDB database has one master database record. There is a partition
database (DB) record and a partition (PART) record for each partition. There is a
partition database data set (DBDS) record for each database data set. We
describe these records and their uses in the following sections.
The record stores information that applies to the entire database. Among the
data are:
Partition selection exit routine name if one is used
Number of partitions defined
Change version number
Highest allocated partition ID number
Data set group count
Global DMB number
Share level
RSR global service group and tracking level
Recoverable or not recoverable
The record may be mapped with the DSPDBHRC macro in ADFSMAC and
SDFSMAC.
32 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Example 3-1 on page 39 shows a listing of a master database record.
The record stores information that applies to the partition. Among the data are:
Master database name
Change version number for the partition
Partition init needed flag
Authorization flags including prohibit further authorization and read only
Global DMB number, which is copied from the master database record
Share level, which is copied from the master database record
RSR global service group and tracking level, which are copied from the
master database record
Recoverable or not recoverable, which is copied from the master database
record
The record stores information that applies to the partition. Among the data are:
Data set name prefix
The record may be mapped with the DSPPTNRC macro in ADFSMAC and
SDFSMAC.
The record stores information that applies to the partition data set. Among the
data are:
Data set name
Skeletal JCL members
Image copy information
Change accumulation information
Flags and counters for image copy needed, recovery needed, and so on
The record may be mapped with the DSPDSHRC macro in ADFSMAC and
SDFSMAC.
34 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
3.2 Dynamic allocation
The information in the RECONs is used for dynamic allocation of HALDB
database data sets. The data set names and DD names from partition DBDS
records are used to provide this information. DFSMDA members are never used
with HALDB.
INIT.DB
The INIT.DB command can be used to register the master database with DBRC.
It defines the DBD name of the master database, its sharing level, the type of
database, whether this database is partitioned by key ranges or a selection exit,
and whether it is recoverable.
INIT.PART
The INIT.PART command can be used to register a partition after the master
database is already registered with DBRC. It creates the HALDB partition
structure, that is a partition record, a partition database record, and one or more
partition DBDS records according to the DBD specification.
CHANGE.DB
The CHANGE.DB command may specify either a HALDB master database or
partition.
When the master database name is used, the command applies to all partitions
and data sets in the database.
36 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
The backout needed flag
The read only authorization flag
The authorization of the partition to a subsystem
The partition init needed (PINIT) flag
When the partition name is used, the command applies only to the partition.
CHANGE.PART
You may use the CHANGE.PART command to change partition definitions. Both
the master database name and the partition name are specified in the command.
The master database name and partition name cannot be changed with this
command. The command may be used to change the following attributes for a
partition:
The high key value when using key range partitioning
The partition string when using a partition selection exit routine
The data set name prefix
The PHDAM randomization parameters
The free space specifications
The OSAM block sizes
The GENMAX value
The RECOVPD value
The image copy REUSE attribute
The skeletal JCL member names
CHANGE.DBDS
You may use the CHANGE.DBDS command to change information about data
sets in a HALDB partition. Specify the partition name, not the master database
name, in the DBD parameter. The command may not be used to change data set
names or DD names. These are determined by the HALDB naming conventions.
The command may be used to change the following attributes in data sets other
than ILDSs and PHIDAM primary indexes:
The GENMAX value
The RECOVPD value
The image copy REUSE attribute
The skeletal JCL member names
The image copy needed flag
The recovery needed flag
Error queue elements (EQEs)
For ILDSs and PHIDAM primary indexes the only attributes that may be changed
are:
The recovery needed flag
Error queue elements (EQEs)
DELETE.DB
You may use the DELETE.DB command to delete a HALDB master database, all
of its partitions, and associated allocation, image copy, recovery, and
reorganization records from the RECONs. You cannot specify a partition name
on the DELETE.DB command. Use the DELETE.PART command to delete a
partition from the RECONs.
DELETE.PART
You may use the DELETE.PART command to delete a partition and associated
allocation, image copy, recovery, reorganization, and DBDS records from the
RECONs.
LIST.DB
You may use the LIST.DB command to list HALDB database, partition, and data
set information. You may specify the TYPHALDB parameter to list information
about all HALDB databases. Alternatively, you may specify either a HALDB
master database name or a partition name in the DBD parameter of the
command. If you use the master database name, information from all partitions is
listed.
LIST.DBDS
You may use the LIST.DBDS command to list information about HALDB
database data sets. You may specify either a master database name or a
38 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
partition name in the DBD parameter. If you specify a DDN parameter, you must
specify the data sets’ partition name in the DBD parameter.
Sample listings
Example 3-1 shows a listing of a master database record.
Example 3-2 shows a listing for a partition. The partition high key record is listed
twice. The second listing is in hexadecimal. Even though the key is only 10 bytes,
it is listed as if it were 32 bytes. The last 22 bytes are a conversion of blanks to
hexadecimal. The hexadecimal listings of partition high keys or partition strings
are always done so that remaining bytes on a line are listed as X’40’.
RANDOMIZER:
NAME=DFSHDC40 ANCHOR=11 HIGH BLOCK#=15000 BYTES=1
FREE SPACE:
FREE BLOCK FREQ FACTOR=0 FREE SPACE PERCENTAGE=0
FLAGS: COUNTERS:
BACKOUT NEEDED =OFF RECOVERY NEEDED COUNT =0
Example 3-3 shows a listing of a HALDB database data set. ALLOC and REORG
information is not shown but would appear for most data sets. Even though the
database is PHDAM, the DBORG value is listed as HDAM. The DBORG value for
PHIDAM database data sets is listed as HIDAM. The DBORG value for ILDS,
PHIDAM primary index, and secondary index data sets is always INDEX.
Example 3-3 LIST.DB or LIST.DBDS output for a HALDB database data set
DBDS
DSN=IMSPSA.IM0A.CUSTDB.A00001 TYPE=PART
DBD=CUSTDB1 DDN=CUSTDB1A DSID=001 DBORG=HDAM DSORG=OSAM
CAGRP=**NULL** GENMAX=2 IC AVAIL=0 IC USED=1 DSSN=00000000
NOREUSE RECOVPD=0 OTHER DDN=**NULL**
DEFLTJCL=**NULL** ICJCL=ICJCL OICJCL=OICJCL RECOVJCL=RECOVJCL
RECVJCL=RECVJCL
FLAGS: COUNTERS:
IC NEEDED =OFF
RECOV NEEDED =OFF
RECEIVE NEEDED =OFF EEQE COUNT =0
--------------------------------------------------------------------------
IMAGE
RUN = 2003.073 16:26:23.3 -05:00 * RECORD COUNT =15000
STOP = 0000.000 00:00:00.0 +00:00 BATCH USID=0000000001
IC1
DSN=IMSPSA.IC1.CUSTDB1.CUSTDB1A.D03073.T143654 FILE SEQ=0001
UNIT=3390 VOLS DEF=0001 VOLS USED=0001
VOLSER=TOTIMM
40 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
All GENJCL commands, other than GENJCL.USER, process data for DDNAMEs
ending A through J. They do not process data for ILDSs (L) and PHIDAM primary
indexes (X). ILDSs and PHIDAM primary indexes do not use standard recovery
techniques. There are no image copies for them. They have no database change
after image log records. They are not included in Change Accumulation
processing. Thus, they are not applicable to GENJCL.IC, GENJCL.OIC,
GENJCL.RECOV, GENJCL.CA, and GENJCL.RECEIVE processing.
GENJCL.USER
You may use GENJCL.USER to process any HALDB database, partition, or data
set. This includes ILDSs and PHIDAM primary indexes.
GENJCL.USER MEMBER(DSPUPJCL)
USERKEYS((%MDBNAME,'masterdbname'),
(%DBNAME,'partitionname'),
(%RCVTYP,'ILE | INDEX | BOTH'))
42 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
3.7 Use of database names in DBRC commands
Many DBRC commands include the specification of a database name. Some of
these commands require the use of a master database name. Some require the
use of a partition name. Some allow either to be used.
44 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
4
You can use both the HALDB Partition Definition utility and commands to
manage your HALDBs. Chapter 5, “Batch definition of HALDB” on page 61,
provides information about the alternative DBRC commands that may be used
for definitions.
The utility is accessed by logging on to TSO and starting ISPF after the dialog
data sets have been made available to the TSO user. You can add the data sets
to a LOGON procedure or use TSO commands to allocate them. You can use the
TSOLIB command to add data sets to the STEPLIB. Table 4-1 shows which file
names and data sets need to be allocated. Be sure to use your own high level
qualifiers.
If you use a logon procedure, you must log on again and specify logon with the
new procedure. If you use allocation commands, they must be issued outside of
ISPF. After you allocate the data sets and restart ISPF, restart the Install/IVP
dialog, return to this task description, and continue with the remaining steps.
Start the HALDB Partition Definition utility from the ISPF command line by
issuing the following command:
TSO %DFSHALDB
The utility consists of several panels and programs that perform various actions
on the database and its partitions. The PDU updates the RECON data sets. You
must be careful to properly back up your installation’s RECONs so you do not
lose the information about your HALDB databases. As all changes are made
directly to the RECON and not held anywhere else it is important to understand
that the changes take effect immediately. There is no record kept of any changes
made. It is important that you protect critical information.
46 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
You specify the database and the type of action to perform on the first panel.
Actions include define, modify, and view. The succeeding panels guide you
through the processes.
Note: The PDU has minimal impact on online IMS subsystems with regard to
RECON contention. The RECON is only reserved for the time it takes to
process a DBRC request. It is not held for the duration of the utility execution.
You must have control authority on the RECON data sets to be able to use the
PDU. IMS Version 8 introduces additional security support for DBRC commands
when entered using the DBRC utility or using PDU. Commands may be secured
at the command verb, resource type, and resource name level. Table 4-2 shows
the equivalent DBRC commands that need to be protected. For example, the
HALDB QUERY command is protected by the LIST.DB master database
command.
Type a 7 in the Option field to indicate that you want to do configuration, and
press Enter. Figure 4-2 shows the Configurations panel.
You must type a slash (/) character in the Act field of the blank line to reach the
Configuration Details panel, as shown in Figure 4-3 on page 49. On this panel,
enter the configuration name with a brief description. We recommend that you
specify a meaningful name, so you can easily associate the RECON data sets
used in this configuration. Enter the appropriate RECON and DBDLIB data sets
(up to 10) for this configuration and press Enter.
48 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Figure 4-3 PDU Configuration Details panel
Upon returning to the PDU main panel, your new configuration becomes your
default configuration. When you are maintaining multiple configurations in the
PDU, you can change your active configuration at any time by entering the
Configurations selection panel and typing a slash (/) in the Act field of your
desired configuration.
If you choose Option 6 you may see the DBDLIB allocated, and if you enter ONLY
RECON in the command line, the output shows you the allocated RECON data
sets. Typing ONLY shows you all allocated data sets.
After you select an active configuration, you need to select a database. In the
main panel type a 1 in the Option field.
You may either select a database directly from the main panel (as shown in
Figure 4-4), or enter a filter in the Database name field. Filter characters are
standard ISPF filter characters: Percent (%) for matching single characters and
asterisk (*) for matching multiple characters. A single asterisk presents the entire
list of DBDLIB members (Figure 4-5).
If you use a filter in the Database name field, you will be presented with a
standard ISPF library listing. You may select a HALDB database from the list by
typing in a slash (/) in the selection field.
50 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
4.1.3 Setting HALDB master DBD parameters
After making a selection, you can start defining the information that pertains to
the entire HALDB master database. This is performed in the Partitioned
Database Information panel, as shown in Figure 4-6 on page 52.
We can see that this database has been defined as a PHIDAM database with
one data set group and no partition selection exit. The defaults of no RSR
parameters, share level 0, and recoverable are also shown. You may change
most parameters. You cannot change the database organization or the number
of data set groups. If you change a value that is also in the DBD, such as the
partition selection exit routine name, it is not updated in the DBDLIB. If you do so,
your DBD could have definitions for your database that differ from those actually
being used. The values in PDU override those in DBD.
The message about database information for NORDDB means that it is not yet
registered in the RECONs. The information shown is taken from the DBD (and
also contains some default values).
After you have pressed Enter, the PDU registers the HALDB master database in
the RECONs, but no partition information is available yet.
After this panel is processed, the RECON listing shows the master database
without partitions (see Example 5-4 on page 64).
52 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Figure 4-7 Setting partition defaults
On the right side of the panel you see More: +, which means that there are
further default settings. Press F8 to scroll and you get the panel shown in
Figure 4-8 on page 54. This shows you the defaults. Regardless of your choice
for the type of definition, you can set the free space parameters for this database.
The values will be used in all of the partitions when they are created. You may
also change the DBRC options to be used. For a PHDAM database, you are
provided with the opportunity to set global randomizing parameters for your
partitions. The defaults for the randomizer are taken from the DBD.
If you want to use the defaults defined on the previous panel, that is all you have
to do. Otherwise, specify individual free-space information, randomizing values
for PHDAM partitions, and your selected DBRC options.
54 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Figure 4-9 Manual definition of partitions
When you press Enter, you will be presented with the Change Partition panel, as
shown in Figure 4-10 on page 56. On this panel you can name your individual
partitions as well as define the high key values for them. As you can see, some
information is propagated forward from previous panels. The partition name and
the data set name prefix were copied forward. You can rename them at this time.
In Figure 4-10 on page 56 the key is numeric. You could also have a key such as
cz. The partition high key field is case sensitive, so the value cz is different from
the value CZ. The values entered in this field are not translated automatically
from lower case to upper case.
High key and partition string values may be specified as either character or
hexadecimal. The default is character. To specify a hexadecimal value you must
specify it explicitly. For example, you could specify a value of x’0084C68E0000’
for a six-byte key.
The partition ID is generated by the PDU and is used as part of the database
data set name. You cannot change it. When you press Enter you receive a
message informing you that the partition was added successfully. Then the
Change Partition panel is shown with the partition ID. To create another partition,
you may just change the value in the Partition name field and enter a new high
key. Then the next partition is defined. To stop defining further partitions press
F12.
At this time, the RECONs have also been updated with the partition information.
Example 5-8 on page 67 shows the first part of the RECON listing.
56 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Figure 4-11 Database partitions listing
Before you can start an automatic definition you need to create an input file
containing the partition high key values for each partition. This input file must
have the same number of records as partitions you wish to define, and the
partition high key values must start in column 1 of each record. Figure 4-12 is an
ISPF browse of an input key’s data set, which is used to define four partitions
corresponding to the four records containing the high key. The last line contains
the value x’FF’. It creates a high key of all x’FF’ bytes.
You now enter YES in the Automatic definition field. The data set containing the
partition high key values is entered in the Input dataset field. Then you specify
the pattern for the partition name. The resulting partition names differ from the
previously entered partition names. In our example, we enter NORDD%%. The value
may be up to seven characters, including % signs. The % signs are replaced with
alphanumeric values in collating sequence. For the first partition, each % sign is
replaced with an A. Further partitions get B to Z followed by 0 to 9. If you have
more than 36 partitions, you must use more than one % sign. In our example, the
names of the partitions will be NORDDAA, NORDDAB, NORDDAC, and
NORDDAD. As before, you must enter the data set name prefix you want to use.
Press Enter, and the PDU defines the partitions for you. There will be a pop-up
window showing you the status of the definition process. This includes the
number of partitions defined and the elapsed time. Figure 4-14 on page 59
shows the results with the message that four partitions have been added
successfully. Note that the partition names generated are different than the
58 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
manually created names used before. The information in the RECONs is
equivalent to what we generated in our manual definitions. Only the partition
names are different.
If you have to change your partitions after you have already loaded your
database, see “Changing existing HALDB databases” on page 257 for further
information.
Note: If you want to add the partition again, the PDU will not reuse the
partition ID of the previously deleted partition. The PDU will assign the next
sequential partition ID and your data set names will include the new partition
ID.
To delete the partitioned database use Option 3 of the main menu. You get the
Delete Database Information panel. There you have to type a slash (/) and press
Enter. Then all information about the HALDB database and all its partitions is
deleted from the RECONs. Therefore, handle this command with care.
60 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
5
These batch commands have the same functions as the PDU. With DBRC,
however, you have to identify partitions one at a time. There is no automatic
definition. You can use any combination of PDU and DBRC commands. When
using DBRC batch INIT commands, you must include an IMS DD statement in
your job stream. This statement identifies the DBDLIB. Otherwise, you get an
error message as shown in Example 5-1.
Most, but not all, DBRC commands that are used with non-HALDB databases
are also used with HALDB.
5.2.1 INIT.DB
Prior to registering your database, you must run DBDGEN to define the master
database. In Example 5-2 a DBDGEN for TESTDB has not been done. The
results of an INIT.DB command for TESTDB are shown.
You may use the INIT.DB command to register a database with DBRC. A
database must be registered with DBRC before you can define its partitions.
62 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
The INIT.DB command registers the master database with DBRC. It defines the
DBD name of the master database, its sharing level, the type of database,
whether this database is partitioned by key ranges or a selection exit, and
whether it is recoverable. For further keywords see Table 5-1.
TYPHALDB DBD
HIKEY | PARTSEL DBTRACK | RCVTRACK
GSGNAME
ICREQ | NOICREQ
NONRECOV | RECOVABL
SHARELVL(0 | 1 | 2 | 3)
TYPHALDB
TYPHALDB is a keyword that you must use to describe the HALDB databases. It
is mutually exclusive with the keywords TYPEIMS for non-HALDB full-function
databases and TYPEFP for Fast Path databases.
HIKEY/PARTSEL
These mutually exclusive optional keywords identify whether the database uses
a partition selection exit or high key values. This setting determines whether the
KEYSTRNG parameter on the INIT.PART command defines a partition selection
exit string or a high key value. These parameters are only valid with TYPHALDB.
HIKEY specifies that this HALDB uses high key values (see Example 5-3).
If you omit both parameters, the default is taken from the DBD. If a partition
selection exit routine is specified in the DBD, it is used. If it is not specified in the
DBD, key range partitioning (HIKEY) is used.
If you list the RECON after issuing the INIT.DB command, you get the output for
your database. Example 5-4 on page 64 shows the results of the command from
Example 5-3. You see the master database defined, but no partitions yet. To
specify the partitions you have to use another command.
5.2.2 INIT.PART
You can use the INIT.PART command only if the database is already registered
with DBRC. The INIT.PART command registers a partition. It creates the HALDB
partition structure (a partition record, a partition database record, and one or
more DBDS records according to the DBD specification). The INIT.PART fails if
the database is being used by the PDU (Example 5-5).
Most parameters of the INIT.PART command apply to all the partition DBDSs
created as a result of this command. An example is the ICJCL skeleton. This
differs from the PDU, where these parameters may be specified separately for
each partition DBDS being created. These parameters could be changed later by
using the CHANGE.DBDS command (or PDU).
Restriction: You can not use an INIT.DBDS command for HALDB data sets.
Data sets are always defined by the INIT.PART.
Table 5-2 on page 65 shows valid keywords for the INIT.PART command.
64 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Table 5-2 Keywords for INIT.PART
HALDB keywords Keywords with the same meaning as in
INIT.DBDS for non-HALDB
DBD GENMAX
PART DEFLTJCL
KEYSTRNG ICJCL, OICJCL
DSNPREFX NOREUSE / REUSE
RANDOMZR, ANCHOR, HIBLOCK and RECOVJCL
BYTES, if PHDAM RECOVPD
FBFF and FSPF RECCVJCL
BLOCKSZE, if OSAM
DBD
DBD(name) is a required parameter. It identifies the master database.
PART
PART(name) is a required parameter. It identifies the HALDB partition name. The
name must be alphanumeric, up to seven characters long, with the first character
being alphabetic.
KEYSTRNG
KEYSTRNG is an optional parameter you use to specify a partition high key
value or a partition selection string for use by a partition selection exit. It may be
a character value up to 256 characters long or a hexadecimal value up to 512
characters long.
DSNPREFX
This parameter is required. It specifies the data set name prefix of the partition’s
data sets. It may be up to 37 characters.
PHDAM
If your database is PHDAM, you may specify the randomizer module name with
RANDOMZR and the values for ANCHOR, HIBLOCK, and BYTES, which
correspond to the specifications in a DBD RMNAME parameter where
RMNAME=(module name, number of root anchor points, number of control
intervals in root addressable area, number of bytes).
If you omit these specifications here, they are obtained from the DBD. If the
values in DBD and INIT.PART are different, the values specified by INIT.PART are
used.
Free space
You may enter your specifications for space that is to be left as free space during
load or reorganization by using the keywords FBFF (every nth control interval or
block is left as free space) and FSPF (free space percentage value per interval or
block). The specification applies to all data set groups in the partition.
Example 5-7 defines two partitions named NORD1 and NORD2 in master
database NORDDB. We specify their high key values, data set name prefixes,
block sizes, and free space values.
After these commands, a LIST.RECON shows that the master database now has
two partitions. It lists information about the partitions. Example 5-8 on page 67
shows only the first partition. The master database listing now indicates that the
number of partitions is 2.
A database record for the NORD1 partition has been added with TYPE=PART.
The DBD name is the partition name. The master database name is also shown.
You may check the data set name prefix, free space, and high key specifications.
The list also includes the partition ID, the previous partition, and the following
66 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
partition. DBRC has the partition init needed flag for HALDB partitions. It has
automatically been set to YES.
FREE SPACE:
FREE BLOCK FREQ FACTOR=5 FREE SPACE PERCENTAGE=25
FLAGS: COUNTERS:
BACKOUT NEEDED =OFF RECOVERY NEEDED COUNT =0
READ ONLY =OFF IMAGE COPY NEEDED COUNT =0
PROHIBIT AUTHORIZATION=OFF AUTHORIZED SUBSYSTEMS =0
HELD AUTHORIZATION STATE=0
EEQE COUNT =0
TRACKING SUSPENDED =NO RECEIVE REQUIRED COUNT =0
OFR REQUIRED =NO
PARTITION INIT NEEDED =YES
ONLINE REORG ACTIVE =NO
PARTITION DISABLED =NO
The INIT.PART command also creates all of the DBDS records for your partitions.
Certain values have automatically been created. Example 5-9 on page 68 lists
the DBDS records.
In the listing two additional DBDS records also appear. The first is for the indirect
list data set (ILDS). It is suffixed by .L00001. The second is for the PHIDAM
primary index and is suffixed by .X00001. You may not change these suffixes.
68 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
5.3.1 CHANGE.DB
HALDB support for the CHANGE.DB command was added to IMS Version 7 by
APAR PQ52858 and to IMS Version 8 by APAR PQ59888. The CHANGE.DB
command is used to change the information about a database or partition. You
may use the CHANGE.DB command with the DBD for the master database
name as well as with the DBD for a partition database name. These are shown in
Example 5-10.
In the first case, changes apply to all partitions. In the second, changes only
apply to the specified partition. The keywords you may use depend on whether
you specify the master or partition database, as shown in Table 5-3.
5.3.2 CHANGE.PART
The CHANGE.PART command was added to IMS Version 7 by APAR PQ52858
and to IMS Version 8 by APAR PQ59888. You can use the CHANGE.PART
command to change the attributes of a partition. The changes apply to all the
DBDSs of the partition. This command may change all of the attributes that you
may set with an INIT.PART command (see “INIT.PART” on page 64). The
following example changes the data set name prefix of all DBDSs of partition
NORD1 to IMSPSA.IM0B.NORDDB (Example 5-11 on page 70).
We can change some attributes, such as skeletal JCL member names, for a
single DBDS of a partition by using a CHANGE.DBDS command. It would be a
good practice to always do a LIST.PART before the CHANGE.PART command.
Note that if you change the randomizer parameters in any way, you should have
unloaded the partition first. If you have not, you are not able to read the partition.
The change of the randomizer parameters turns the partition init needed flag on
and the partition is unreadable.
5.3.3 CHANGE.DBDS
Use the CHANGE.DBDS command to change some of the attributes of a single
DBDS.
The information is stored in a DBDS record in RECON. You cannot change the
data set name or DD name with this command. Keywords DDNNEW or DSN are
not allowed for HALDB data sets. The naming conventions apply to all DBDSs of
a partition and cannot be overridden for a single DBDS.
You have to distinguish between data data sets and index or ILDS data sets
when using other keywords.
For ILDS and index data sets only, the keywords listed in Example 5-12 are valid.
Example 5-12 Valid keywords for ILDS and PHIDAM primary index
ADDEQE | DELEQE
RECOV | NORECOV
This means that you may only change the information about error queue
elements and the recovery needed status for PHIDAM primary index and ILDS
data sets.
For data data sets you can use more keywords. They are listed in Example 5-13.
Example 5-13 Valid keywords for data data sets in HALDB partitions
ADDEQE | DELEQE
DEFLTJCL | NODEFLT
GENMAX
ICJCL
ICON | ICOFF
NOREUSE | REUSE
70 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
OICJCL
RECOV | NORECOV
RECOVJCL
RECOVPD
RECVJCL
Example 5-14 is an example of changing the status of a data set from recovery
needed to recovery needed off.
5.4.1 DELETE.DB
HALDB support for the DELETE.DB command was added to IMS Version 7 by
APAR PQ52858 and to IMS Version 8 by APAR PQ59888. Use a DELETE.DB
command to delete a database from the RECONs. The command also deletes all
information related to the database that has been recorded in the RECONs.
Example 5-15 shows the deletion of database NORDDB and its related
information from the RECONs. A partition name cannot be specified. If the
database is a HALDB database, the master and all its partitions are deleted. If
the database or any of its partitions is in use, the command fails, and none of the
RECON records are deleted.
5.4.2 DELETE.PART
The DELETE.DB command was added to IMS Version 7 by APAR PQ52858 and
to IMS Version 8 by APAR PQ59888. Use a DELETE.PART command to delete a
partition from the RECONs. The command also deletes all information related to
that partition that has been recorded in the RECONs. Note that if you delete a
partition, you will not be able to use the recovery utility to put the partition back.
72 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
6
Partition initialization writes the partition ID number and the initial reorganization
number in PHDAM and PHIDAM partitions. The initial reorganization number is
one. The numbers are written in the first four bytes of the first block of the first
data set. This is the bit map block. The first four bytes are used for the DBRC
usage indicator in non-HALDB databases. Since DBRC registration is always
required with HALDB, the DBRC usage indicator function is not used with
HALDB. For PHDAM partitions, a dummy record is written and deleted. For
PHIDAM partitions, the high keys (all X’FF’s) record is written. This record is
stored in every PHIDAM partition. For PSINDEX partitions, one record is written
and then deleted. These actions make the high-used-RBA non-zero.
74 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
6.2 DBRC flags used with partition initialization
Partition initialization uses two flags in the RECONs. These are the partition init
needed and the image copy needed flags.
The setting of the flag is shown in a listing of the partition database record in the
RECONs as PARTITION INIT NEEDED =NO or PARTITION INIT NEEDED
=YES.
Example 6-1 Setting the PINIT flag for master database PEOPLE
CHANGE.DB DBD(PEOPLE) PINIT
As when used with non-HALDB databases, the utility also creates a control data
set (CDS). The CDS is not required by other utilities when they process HALDB
databases. With HALDB the CDS is merely used to disable any attempted use of
the Database Scan and Database Prefix Resolution utilities. Nevertheless, the
DFSURCDS DD statement is required with the Prereorganization utility.
The DBIL, DBR, or DBM control statement is used to indicate which database or
databases should have their partitions initialized. All of these control statements
do the same initialization for HALDB partitions. We used the DBIL statement in
our testing. You may specify multiple databases on the statement. Database
names must be eight bytes, left justified, and separated by commas.
Example 6-3 shows the control statement we used to initialize the partitions in
databases PEOPLE and PEOSKSI. Since PEOPLE is only six bytes, we placed
two blanks before the following comma.
76 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
There are two ways to execute this utility. It may use a utility (ULU) region under
the control of DFSRRC00 or it may execute as a stand-alone program.
Example 6-4 shows the JCL that may be used to execute as a utility region.
Example 6-5 shows the JCL that may be used to execute as a stand-alone
program. When executed as a utility region, the utility can initialize the partitions
for only a single database. The database is specified as the third subparameter
in the PARM specification. In Example 6-4 the partitions in database PEOPLE
are initialized.
This utility does not create the control data set (CDS) that the Prereorganization
utility creates. This is not a problem since the CDS is not used with HALDB.
78 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
7
Key range partitioning is the simpler method to implement because you do not
have to write an exit routine. You only have to assign a high key to each partition.
In PHIDAM and PSINDEX databases, the records are in key sequence across
the entire database. This makes them compatible with HIDAM and non-HALDB
secondary index databases. When a partition selection exit routine is used for
PHIDAM or PSINDEX databases, records are in key sequence within a partition,
but not across partitions. This would make these databases incompatible with
HIDAM and non-HALDB secondary index databases. Applications that require
database records to be in key sequence would not function correctly.
IMS is aware of the impact of the addition of partitions, their deletion, or changes
in their boundaries. IMS can determine which partitions require initialization after
these changes. Figure 7-1 illustrates this. In the figure, the change of the high
key for partition B from 40000 to 50000 would require the movement of records
from partition C to partition B. Both of these partitions would have to be unloaded
before the change. Both would have to be initialized and reloaded. IMS sets the
partition init needed flag for both partitions when the high key for partition B is
changed. This is not true when you use an exit routine. The logic of the exit
routine determines which partitions require initialization after these changes. You
are responsible for understanding this and initializing the correct partitions.
A B C D
High key = 20000 High key = 40000 High key = 70000 High key = high values
80 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
We recommend that you assign a high values key to a partition. If you do not and
if an application attempts to insert a root with a key higher than the highest key
defined, the call will receive an FM status code. Most applications are not coded
to handle this status code. A high values key is one with X’FF’ for each byte.
There is a case where key range partitioning will require the addition of partitions
or changes to their key ranges over time. This occurs when records that are
added to the database have increasing keys. Examples include keys created by
incrementing the previous key and keys based on dates or times. As records are
added, you will need to split the last partition into multiple partitions. As records
are deleted, you may want to consolidate partitions containing lower values.
An exit routine would allow you to assign records to a partition based on a value
other than the high order part of the key. Figure 7-2 illustrates a use of an exit
routine. In this figure a warehouse code is in the fifth and sixth bytes of the
eight-byte key. The partition selection exit routine assigns records to partitions
based on the warehouse code. The installation plans on processing data by
warehouse. By isolating data for a warehouse in one partition, they can simplify
the processing and improve its performance.
The HALDB Conversion and Maintenance Aid product includes an exit routine
that will do this kind of partition selection. If you use it, you do not have to write
the exit routine. You only have to specify what part of the key is to be used and
the values for each partition.
In the last paragraph in 7.1.1, “Key range partitioning” on page 80, we discuss a
database whose key values continued to increase. With key range partitioning
this could present a problem. You would have to continually adjust the partitions.
An exit routine might solve this problem. If there is no need for key sequence
processing, an exit routine could distribute the records across partitions evenly.
For example, it might assign the records based on the low order part of the key.
Then each partition would always receive a consistent percentage of the records.
Databases whose records must be processed in key sequence must use key
range partitioning. Typically, a partition selection exit routine would assign
records such that moving from one partition to the next might cause a decrement
in the key value. The keys are sequential within the partitions but not from one
partition to the next. This may have an impact on the application if it expects the
keys to always increase. Records in HIDAM databases and non-HALDB
secondary indexes are always in key sequence. When they are migrated to
PHIDAM or PSINDEX do not use a partition selection exit routine unless you are
sure that key sequence processing is not required.
82 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Select next partition.
The second area contains the Partition Definition Area prefix and entries. The
prefix contains a pointer to the first entry and the number of entries. It also
contains five words of storage that are available for your use. There is an entry
for each partition. They are in adjacent storage locations. Each entry contains
information about a partition including its name, partition ID, partition string
length, and partition string address. The DFSPDA DSECT maps the prefix and
the DFSPDAE DSECT maps an entry. These DSECTs can be found in IMS
Version 8 Customization Guide, SC27-1294, and they are also included in the
DFSPSE00 sample program.
84 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
User modification to the sample exit routine
The sample could be the basis for writing a routine to support other types of
partitioning. For example, if you wish to implement partitioning as shown in
Figure 7-2 on page 81, you can modify the sample. The modification needs to
compare the warehouse code field in the key with the partition strings. Each
warehouse code would be the partition string for its partition. Example 7-1 shows
the modification to DFSPSE00 that we made to implement this partitioning
scheme.
The modification is in the select target partition function of the routine that is at
label PSETRGT. The modification is surprisingly easy. It requires only the
addition of one instruction. This is a load address (LA) instruction to change the
address for the compare. Since the field with the warehouse code is at offset four
in the key, we add four bytes to the key address. We do not have to modify the
length of the compare. The module bases the compare length on the size of the
largest partition string, not the size of the key as it is defined in the DBD. This is
what our partitioning scheme needs. When defining the partitions for use with
this exit routine, we specify two-byte partition strings. Each string is a two-byte
warehouse code.
86 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Part 2
Part 2 Migration
In this part we describe the process used to migrate databases to HALDB. We
include secondary indexes and logically related databases. We provide
examples of the migration of databases.
The HALDB Conversion and Maintenance Aid is a product that simplifies the
migration process and the maintenance of HALDB databases. We describe this
tool and show you how to use it.
Secondary indexes are created when their indexed database is migrated. They
are created with the following steps:
DBDGEN as a HALDB secondary index
Deletion of secondary index database information from the RECONs
Definition of partitions
Allocation of database data sets
Sort of output file from the unload of the indexed database
Load of the secondary index using HD Reload
Image copy of the database data sets
Changed and additional steps for the migration of databases with secondary
indexes are explained in 8.5, “Migrating databases with secondary indexes” on
page 101.
90 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
HIDAM index DBDs
There is no DBD for a PHIDAM primary index. When a HIDAM database is
migrated to PHIDAM, the DBD for the HIDAM Index is discarded. IMS gets the
information required to generate the PHIDAM primary index from the PHIDAM
DBD.
DBD statement
There are the following three changes to the DBD statement for HALDB:
There are new values for the ACCESS parameter. They are PHDAM,
PHIDAM, and PSINDEX. The value should be changed to the appropriate
value.
The optional PSNAME parameter has been added. It is used to specify a
default partition selection exit routine. If you are not going to use the exit
routine, do not specify this parameter.
The RMNAME parameter has a slightly different meaning. With PHDAM
databases it is optional. It is used to define default randomizer values for
partitions. These values may be changed for individual partitions when they
are defined.
DATASET statement
The DATASET statement is not used in HALDB DBDs. The entities it defines for
non-HALDB databases are handled differently with HALDB as follows:
DDNAMEs are created by the definition of partitions.
Data set groups are defined by the DSGROUP parameter on SEGM
statements.
Free space and OSAM block size specifications are made when partitions are
defined.
The SCAN parameter is not specified with HALDB DBDs. HALDB operates as
if SCAN=0 were specified. This is also the recommended value for
non-HALDB databases.
SEGM statement
There are the following three changes to the SEGM statement for HALDB:
The valid specifications for the PTR parameter have changed.
HALDB does not use hierarchic pointers. Any use of HIER, H, HIERBWD, or
HB keywords with the PTR parameter must be changed to TWIN, T,
TWINBWD, or TB.
PHIDAM does not support the use of twin forward only (TWIN or T) pointers
for root segments. If you have HIDAM roots using twin forward only pointers,
LCHILD statement
The LCHILD statement is not used to define the primary index in a HIDAM DBD.
When converting a HIDAM DBD to PHIDAM, this LCHILD statement should be
deleted.
When converting a secondary index DBD to a HALDB PSINDEX DBD, there are
three possible changes required:
If PTR=SYMB is specified in a secondary index, it must be changed to
PTR=SNGL or omitted. PTR=SNGL is the default and only valid specification
for PSINDEX LCHILD statements.
If PTR=SYMB is specified in a HDAM or HIDAM indexed database, it must be
changed to PTR=INDX.
An RKSIZE parameter must be specified on the LCHILD statement in the
secondary index DBD. This is the size of the root’s key in the target database.
When converting a logical relationship using symbolic pointing, you must omit the
PTR=SYMB specification on the LCHILD statement for the logical relationship.
The changes for LCHILD statements used to define logical relationships using
virtual pairing are explained in “Making changes to the DBDs for physical pairing”
on page 116.
XDFLD statement
HALDB does not support shared secondary indexes. If the CONST parameter is
specified in an XDFLD statement of an indexed database, it must be deleted. The
92 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
CONST parameter is used to specify the character associated with a shared
secondary index. Each HALDB secondary index must be stored in its own
secondary index database. Separate PSINDEX databases must be defined for
each shared secondary index being converted to HALDB.
FIELD statement
The BYTES parameter of the sequence field for a secondary index segment
must be increased by four bytes if a /SX field is used as a subsequence field. We
explain this further in “/SX subsequence fields” on page 102.
The utility reports for non-HALDB secondary indexes must be used with care.
Some of the information reported is not accurate. We explain the special
considerations for using DFSMAID0 with secondary indexes in 8.5.2, “Estimating
the sizes of secondary index partitions” on page 107.
You choose the type of analysis that the utility does. There are three options.
First, you may specify the high key values for potential partitions. The utility
reports the space required for each of these partitions. Second, you may specify
the maximum number of bytes of segment data stored in each partition. The
utility reports the number of partitions required and their high keys. Third, you
may specify the number of equal-sized partitions to be used. The utility reports
the space required and the high key for each partition. In all cases, the utility
reports the total amount of space required for all segments in the database.
8.2.1 Reports
There is a separate report for each partition and one for the database.
Example 8-1 on page 94 shows a typical report for a partition. The lowest key
and highest key in the partition are reported in both character (EBCDIC) and
hexadecimal formats. Each segment type in the database is listed. The
segments column reports the number of segments. The bytes column reports the
number of bytes those segments require in HALDB. The prefix-incr column
minimum key =
maximum key =
We explain how to use the report with secondary indexes in 8.5.2, “Estimating
the sizes of secondary index partitions” on page 107.
94 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
KR control statement
KR control statements are used for key range analysis. You specify a statement
for each partition except one with high values. When doing key range analysis,
the utility always assumes that a partition with high values is to be included. Keys
may be specified as either character or hexadecimal. Example 8-2 shows the
specification of keys in both formats. This produces reports for four partitions.
The MAX statement should not be used when reading a non-HALDB secondary
index. The number of bytes reported for secondary indexes is inaccurate,
therefore, the MAX statement would provide misleading information.
When you migrate a database, you will probably want to keep the same database
name. This avoids the need to change PSBs that reference the database. In our
examples and explanations we have assumed that the same name will be used
for the HALDB.
96 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
specified. With this statement, HD Unload creates a HALDB prefix for each
unloaded segment in its output file. The prefix includes a generated ILK to be
associated with the segment. OSAM sequential buffering should be used with
OSAM database data sets. This will typically improve the performance of the
unload.
You may be able to use the information generated by the HALDB Migration Aid
utility (DFSMAID0) to assist you in sizing the data sets. It reports the number of
bytes of segment data in each partition. You will need additional space for
segments to be added, free space, and bit maps.
When migrating to HALDB you may want to increase your free space
parameters. Non-HALDB databases sometimes have suboptimal free space
values due to data set size limitations. Additional free space may allow you to
reorganize your databases or partitions less frequently. In some cases, additional
free space could eliminate the need for reorganizations.
Each PHDAM or PHIDAM partition includes an ILDS. This is required even when
there are no secondary indexes or logical relationships. In this case, you can
allocate a very small amount of space for the data set, such as one track.
All ILDSs have fixed-length 50-byte records. Keys are nine bytes at zero offset.
Example 8-7 shows IDCAMS DEFINE statements to allocate an ILDS.
98 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
)
You must specify REUSE on the DEFINE for all HALDB VSAM data sets other
than ILDSs.
DBDGEN output is useful when allocating PHIDAM primary indexes. The output
of DBDGEN for the PHIDAM database reports required parameters for the
IDCAMS define. This is shown following the label RECOMMENDED VSAM
DEFINE CLUSTER PARAMETERS. The required parameters are the KEY
values, RECORDSIZE values, INDEXED, and REUSE. Example 8-8 shows
IDCAMS DEFINE statements to allocate a PHIDAM primary index data set.
Example 8-8 Sample DEFINE for a PHIDAM primary index data set
DEFINE CLUSTER( -
NAME(JOUKO3.HALDB.DB.RZL.X00001) -
INDEXED -
CYL(10 5) -
RECORDSIZE(20 20) -
SHAREOPTIONS(3 3) -
REUSE -
KEY(14,5) -
FREESPACE(25,10) -
CONTROLINTERVALSIZE(8192) -
VOLUMES(TOTIMN) -
)
100 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
loaded. First, the writes of the ILDS entries to different partitions are overlapped.
Second, the writes are sequential. Third, the writes are done in load mode. This
avoids the overhead of CI and CA splits. There is an additional benefit of load
mode: Free space may be created. Future reorganizations could benefit from
having this free space for their updates to the ILDSs.
The NOILDS control statement is not limited to migrations. It may be used for any
execution of HD Reload.
There are two standard ways to migrate databases with secondary indexes. First,
you can migrate the database and create the HALDB secondary indexes from
the migrated source segments. This method uses the MIGRATX=YES control
statement with HD Unload. We recommend this method. Second, you can
migrate the database and migrate the secondary indexes. This technique
requires that each secondary index be unloaded. The MIGRATE=YES control
statement is used for the unload of the indexed database and the unload of each
secondary index. This method has two disadvantages. Each secondary index
must be read. When reading the secondary index, the indexed database also
There is an alternative to the two standard migration methods. This requires the
use of the IMS Index Builder tool. This tool can build your secondary indexes
from the indexed database. You do not have to migrate the secondary indexes
when you use Index Builder. Instead, you can migrate the indexed database and
then use Index Builder to create the secondary indexes.
Changes are not required to the XDFLD statement or the /SX FIELD statement in
the indexed DBD. The BYTES parameter on the /SX FIELD statement is not
required and is ignored if it is specified.
Example 8-9 shows the DBD for an indexed HDAM database with a /SX field
defined.
102 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
SEGM NAME=AUTO,BYTES=54,PTR=TB
FIELD NAME=(ID,SEQ,U),BYTES=10,START=1
FIELD NAME=MAKE,BYTES=20,START=11
FIELD NAME=MODEL,BYTES=20,START=31
FIELD NAME=YEAR,BYTES=4,START=51
FIELD NAME=/SX1
LCHILD NAME=(MAKEMOD,VEHSI),PTR=INDX
XDFLD NAME=MMIDX,SRCH=(MAKE,MODEL),SUBSEQ=/SX1
DBDGEN
FINISH
END
Example 8-10 shows the DBD for a non-HALDB secondary index that uses the
/SX field defined in Example 8-9 on page 102.
Example 8-11 shows the DBD from Example 8-9 on page 102 after it has been
converted to HALDB. The only changes are those made for all HDAM DBDs
when they are converted to PHDAM. That is, the ACCESS parameter on the
DBD STATEMENT is changed to PHDAM and the DATASET statement is
deleted.
Example 8-12 shows the DBD from Example 8-10 on page 103 after it has been
converted to HALDB. As with other secondary index DBD conversions, the
ACCESS parameter on the DBD statement is changed to PSINDEX, the
DATASET statement is deleted, and the RKSIZE parameter is added to the
LCHILD statement. Since a /SX field is used as a subsequence field, the BYTES
parameters on the SEGM and FIELD statements are incremented by four.
Symbolic pointers
You cannot have symbolic pointers in a HALDB secondary index. If you currently
have symbolic pointers, you must eliminate them. Symbolic pointers are defined
with a PTR=SYMB parameter on the LCHILD statements in the non-HALDB
secondary index and the indexed database DBDs. You must change the
PTR=SYMB specification in the indexed database DBD to PTR=INDX and either
omit the PTR parameter in the secondary index DBD or specify PTR=SNGL in it.
An illustration of these changes is shown in the following examples.
Example 8-13 shows the non-HALDB secondary index DBD with symbolic
pointing defined. Example 8-14 on page 105 shows the indexed HDAM DBD.
Example 8-15 on page 105 shows the secondary index DBD after it has been
converted to HALDB. PTR=SYMB is deleted from the LCHILD statement.
RKSIZE is added to it. Symbolic pointers are stored in the data area of index
segments. Since it is not in the HALDB secondary index, the BYTES parameter
on the SEGM segment is reduced by the size of the symbolic pointer.
Example 8-16 on page 105 shows the indexed database DBD after it has been
converted to HALDB. PTR=INDX is specified on the LCHILD segment for the
secondary index relationship.
104 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
FINISH
END
If you have applications that process a secondary index using symbolic pointers
as a database, you will want to make other changes to your DBDs. We explain
these changes in 11.5.2, “Secondary indexes with symbolic pointers” on
page 202.
106 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
8.5.2 Estimating the sizes of secondary index partitions
HALDB secondary index records are often much larger than non-HALDB
secondary index records. There are two reasons for this. First, the pointers are
different. Each HALDB secondary index record includes the 28-byte extended
pointer set (EPS). Non-HALDB secondary index records have either a 4-byte
direct pointer or a symbolic pointer. Symbolic pointers are the length of the
concatenated key. Second, the root key of the target segment is stored in the
HALDB secondary index record. This is not done with non-HALDB secondary
index records. When allocating your HALDB secondary index partitions, you
must account for this increased size.
You must define partition boundaries for secondary indexes. The HALDB
Migration Aid (DFSMAID0) utility may be used to report on secondary indexes.
The total size of the secondary index is usually easy to estimate. All secondary
index entries are fixed length. The DBDGEN reports this length. It is the
RECORDSIZE in the RECOMMENDED VSAM DEFINE CLUSTER
PARAMETERS of the HALDB DBDGEN output listing. The number of entries
does not change during the migration. You can find the current number of entries
from the output of several utilities. When you recreate a secondary index as part
of a reorganization process, the HISAM Reload utility or any tool that you use
reports this information. Alternatively, you can use the REC-TOTAL value from
LISTCAT to find the number of records in the existing secondary index data set.
Finally, you may use the HALDB Migration Aid utility to find the number of
records. The number of records, their length, and free space requirements may
be used to estimate the size of an entire HALDB secondary index. For example,
if you had 1,000,000 entries, a record length of 48 bytes, and wanted an
additional 25 percent for free space, the index would require 60,000,000 bytes.
The size requirements of each partition will depend on the number of index
entries in the partition. You may estimate this from the output of the HALDB
Migration Aid utility (DFSMAID0) or from other means. If you already know the
number of secondary index entries in a key range you do not need to use the
Migration Aid utility. Otherwise, you should use the utility.
The Migration Aid utility provides accurate information about the number of
records in a key range and key range boundaries. It does not provide accurate
information about the number of bytes required for a segment or partition. For
this reason, you should not use the MAX control statement when reading a
secondary index. If you know the number of partitions you want, use the NBR
control statement. If you know the high keys that you want, use KR control
statements. When an NBR statement is used, the high keys that are reported for
each partition are accurate. When using KR control statements, the number of
segments reported for each partition is accurate.
minimum key =
maximum key =
--------------------------------------------------------------------------------
sum of partitions:
segments bytes prefix-incr length-incr
1) 'ORDRCUST' 634078 15217872 5072624 0
SUM) 634078 15217872 5072624 0
-------------------------------------------------------------------------------
You may use the record size reported by DBDGEN and the number of segments
for a partition to estimate the size requirement for the partition. Of course, you
can add free space and room for expansion of the partition.
108 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
8.5.3 Unloading databases with secondary indexes
When you unload a database with secondary indexes for migration to HALDB,
you can create unload files for its secondary indexes. This is done when you
specify the MIGRATX=YES control statement with HD Unload. This technique
does not read the secondary indexes. DD statements for the secondary index
data sets are not required. The information to create secondary index entries is
generated from the source segments. The unload files for secondary indexes
must be sorted before they are used to load the secondary indexes. The output
of HD Unload includes sort control statements to be used for the sorts.
Figure 8-1 illustrates a use of MIGRATX=YES to migrate a database and its two
secondary indexes.
Non-HALDB HALDB
Secondary
Index 1
Secondary
Sort HD Reload Index 1
Report
Sort
Ctl.
Indexed
Database
Indexed
HD Unload HD Reload Database
Sort
Secondary Ctl.
Index 2
Secondary
Sort HD Reload Index 2
OSAM sequential buffering should be used with OSAM database data sets. This
will typically improve the performance of the unload.
The MIGRATX=YES technique does not preserve any user data in the secondary
indexes. This is rarely a problem because most installations do not have user
data. They avoid user data because it is lost when the reorganization of a
non-HALDB database requires the rebuilding of its secondary indexes. These
rebuilds do not preserve user data.
The SYSPRINT listing of HD Unload includes a Work File Statistics report. It tells
you which output files are to be used for each secondary index. This is not based
on secondary index names. You must use the report to understand this
relationship. The utility assigns DFSWRK01 to the first secondary index
You must sort each secondary index output file. Use the sort control statements
in the DFSSRTnn files for these sorts. Example 8-21 shows sample JCL for the
sorting of the STUNUM secondary index. The SORTIN DD specifies the
DFSWRK01 output from HD Unload. The SYSIN DD specifies the DFSSRT01
output from HD Unload. The output of this sort is input to HD Reload for the
STUNUM secondary index.
110 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
MIGRATE=YES. This is the technique that is used when there are no secondary
indexes. It is explained in 8.3.1, “Unloading the existing database” on page 96.
The sorted output files from HD Unload are used as input to HD Reload when
creating a secondary index as part of the migration. Before loading a secondary
index, you must modify its DBD, define its partitions, allocate its data sets, and
initialize its partitions. These are the same steps required for migrating any other
databases.
HD Reload has options for creating ILDS entries. We explain these options in
8.4, “ILDS creation options” on page 100.
2. Sort the file containing unload records in the /SX subsequence order. You
must calculate the offset and the size of the sort field. The offset is 63 bytes
plus the size of the root key of the indexed database. The sort field size is the
size of the secondary index search field plus eight bytes. Example 8-24
shows sort JCL and control statements for this step. In this example, the
offset is 73 bytes and the sort field size is 18 bytes.
112 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
3. Merge the records into one file. Example 8-25 shows sort JCL and control
statements for this step.
Indexed
Database
Indexed
HD Unload HD Reload Database
Secondary
Index 2
Secondary
HD Unload HD Reload Index 2
HALDB supports unidirectional and bidirectional with physical pairing. It does not
support virtual pairing. The following types of migrations of logical relationships
are supported:
Unidirectional to unidirectional
Bidirectional with physical pairing to bidirectional with physical pairing
Bidirectional with virtual pairing to bidirectional with physical pairing
114 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
8.6.2 Changing DBDs with logical relationships
The DBDs for databases with logical relationships may have to be modified when
converting to HALDB. There are two reasons for this. First, some pointer options
are not supported with HALDB. Second, HALDB does not support virtual paring
with bidirectional logical relationships.
The DBDs for logical databases are not changed when the physical databases
they reference are migrated. DBDs for logical databases have
ACCESS=LOGICAL in their DBD statements.
HALDB does not use symbolic pointers. Any logical relationship implemented
with symbolic pointing must be changed. This is done by adding the LPARNT
keyword to the PTR parameter on the SEGM statement for the logical child. Even
though symbolic pointing is not used, the concatenated key of the logical parent
is stored in the logical child. This is done no matter what keywords you use in the
PARENT parameter. That is, PHYSICAL or P will be used even if you specify
VIRTUAL or V. To avoid the warning message that is issued when VIRTUAL or V
is specified, you should specify the PHYSICAL or P keyword.
116 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
(LPCK). The BYTES value for this segment may be calculated by taking
the BYTES value from the paired logical child's SEGM statement, adding
the LPCK size for this segment, and subtracting the LPCK size for the
paired logical child. In the example, the paired logical child for the
NAMESKIL segment is the SKILNAME segment. Its size is 80 bytes. The
LPCK for the NAMESKIL segment is the TYPE field in the SKILMAST
segment. Its size is 21 bytes. The LPCK for the SKILNAME segment is the
EMPLOYEE field in the NAMEMAST segment. Its size is 60 bytes. The
BYTES parameter for the NAMESKIL segment should be 41, which is 80 +
21 - 60.
b. Delete the SOURCE parameter.
c. Change the PARENT parameter so that it also references its logical
parent. In the example this is the SKILMAST segment. The PARENT
parameter should also include the PHYSICAL or P keyword.
d. Change the PTR parameter specifications. Include PAIRED. Include
TWIN, T, TWINBWD, TB, NOTWIN, or NT. Do not use NOTWIN or NT
unless you will have a maximum of only one instance of this segment type
under a parent.
Find the SEGM statement for segment that was the real logical child. In
Example 8-26 on page 115 this is the SKILNAME segment. In this SEGM
statement make the following changes:
– Change the PARENT parameter so that neither SNGL nor DBLE is
specified. If VIRTUAL or V was specified, change this to PHYSICAL or P.
– Change the PTR parameter specifications. Delete LTWIN, LT, LTWINBWD,
or LTB keywords if they exist. Specify both the LPARNT and PAIRED
keywords.
Example 8-28 and Example 8-29 on page 118 show the DBDs from
Example 8-26 on page 115 and Example 8-27 on page 116 after they have been
converted to HALDBs with physical pairing. In addition to the changes made for
logical relationships, other changes for the conversion to HALDB have been
made. These are changes in the ACCESS parameter on the DBD statements
and deletion of the DATASET statements.
Stated another way, there are only two cases where the logically related
database is not read. They are:
The database being unloaded contains the real logical child of a virtually
paired relationship that uses direct pointing, and the logical parent’s
concatenated key is stored in this logical child.
The logical relationship is unidirectional using direct pointing, and the logical
parent’s concatenated key is stored in the logical child.
When reading the logically related database, either the logical parent or the
paired logical child of each logical child is read. That is, each instance of a logical
relationship requires a read of the related data. These reads are random. Each
read may require a physical I/O. This can greatly increase the elapsed time of the
unload.
118 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Buffer pools must be provided for any logically related database that is read by
the unload. The DFSVSAMP DD statement for HD Database Unload
(DFSURGU0) must include definitions for these buffers.
HALDB
Non-HALDB
Database 1
Database 1
HD Unload HD Reload
Logically
Related
DBs Database 2
HD Unload HD Reload
Database 2
HD Reload has options for creating ILDS entries. We explain these options in
8.4, “ILDS creation options” on page 100.
When migrating from PDB to HALDB you may want to maintain the same
partition boundaries. If so, a migration of a HIDAM database or secondary index
would use key range partitioning with HALDB. A migration of an HDAM database
would use a HALDB partition selection exit routine which assigns a root to a
partition just as the randomization routine assigned a root to a PDB RAP range.
This means that the logic used in the randomization routine would be moved to
the partition selection exit routine.
When migrating from PDB to HALDB you may want to change partition
boundaries. If so, you can use any scheme acceptable to HALDB. Most users
choose key range partitioning, so a typical migration from HDAM with PDB to
PHDAM would change partitioning to key range partitioning.
120 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
8.7.3 Using standard IMS utilities for the migration
You may migrate a PDB HDAM or HIDAM database as you would migrate other
HDAM or HIDAM databases. This uses the IMS HD Unload and IMS HD Reload
utilities. HD Unload will read an entire PDB database. It cannot be used to unload
a single partition. Using this technique you cannot migrate partitions in parallel. If
you have secondary indexes you must use the MIGRATX=YES statement with
HD Unload.
You cannot use this technique to migrate a PDB HISAM database to HALDB.
The MIGRATE=YES and MIGRATX=YES control statements are not valid when
unloading a HISAM database.
PDB HALDB
Application Application
Program Program
Application Application
Program Program
Application Application
Program Program
Figure 8-4 Migration from PDB using application programs with PROCOPT=L
If you modify your partition boundaries, the load programs cannot use
PROCOPT=L. If you are migrating from PDB HDAM to PHDAM, you are unlikely
to maintain the same partition boundaries. If so, you cannot use PROCOPT=L for
each program. Only one program can load segments (PROCOPT=L) in a
partition. Multiple programs may insert segments in the same partition when
using PROCOPT=I. Figure 8-5 on page 122 illustrates this technique.
Application Application
Program Program
Application Application
Program Program
Application Application
Program Program
Figure 8-5 Migration from PDB using application programs with PROCOPT=I
These techniques are valid for migrating PDB HISAM databases to PHIDAM.
8.7.5 Using PSU Unload and application programs for the migration
PDB has its own unload and reload utilities. They are PSU Unload and PSU
Reload. They are used to reorganize individual partitions or reorganize partitions
in parallel. The PSU Unload utility does not have the capability to create an
unload data set with HALDB headers. In other words, it does not have the
capabilities the HD Unload has when MIGRATE=YES or MIGRATX=YES is used.
There are no such control statements for the PSU Unload utility. Nevertheless,
you may be able to use PSU Unload to avoid writing the application unload
programs shown in Figure 8-4 on page 121 and Figure 8-5. This is shown in
Figure 8-6 on page 123. Each instance of PSU Unload creates an unload file.
This file is used as input to the application program that inserts the segments in
the HALDB database. The file contains a header record, one record for each
segment, and a trailer record. The segment record includes the segment name
and the segment data. The output of PSU Unload may be mapped by using the
DSECT in the IMS DFSURGUF macro in SDFSMAC. If the same partition
boundaries are maintained, the load programs may use PROCOPT=L. If not,
PROCOPT=I must be used to avoid loading a partition multiple times.
122 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
PDB HALDB
PSU Application
Unload Program
PSU Application
Unload Program
PSU Application
Unload Program
You cannot use HD Reload or PSU Reload to load the HALDB when using PSU
Unload to unload the PDB database. Migration with HD Reload requires that the
input file contain HALDB prefixes. PSU Unload does not create these prefixes.
PSU Reload cannot load a HALDB database.
If you have user partitioning, you will probably want to migrate these databases
to a single HALDB database. The migration may be done with user-written
application programs or a combination of the user programs and the HD Unload
utility.
Application
Program
DBs HALDB
Application Application
Program Program
Application Application
Program Program
Application Application
Program Program
Figure 8-8 Migration from user partitioning with multiple load programs
124 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
HALDB
DBs
Application Application
Program Program
Application Application
Program Program
Application Application
Program Program
Figure 8-9 Migration from user partitioning with multiple insert programs
DBs HALDB
Application
HD Unload
Program
Application
HD Unload
Program
Application
HD Unload
Program
If you have not updated the database after a migration to HALDB, you would
restore the non-HALDB database from the last image copy and any necessary
logs. Of course you would also have to change the DBD to its former
specifications and delete and reregister the database to DBRC.
If you have updated the database after a migration to HALDB, you may not be
able to fall back. If the data will no longer fit in the space limitations of a
non-HALDB database, fallback would not be possible. If the fallback is possible,
the steps for this fallback are the following:
1. Unload the database using HD Reload with a FALLBACK=YES control
statement.
2. Perform DBDGEN.
3. Delete the HALDB information for the database from DBRC.
4. Register the non-HALDB database to DBRC.
5. Execute Database Prereorganization using the DBR control statement.
6. Reload the database using HD Reload.
The database data sets must be image copied after the fallback.
If the database has secondary indexes, its secondary indexes must be rebuilt.
If the database has logically related databases they must be converted at the
same time. See 8.9.2, “Fallback with logical relationships” on page 127, for
additional considerations with logically related databases.
126 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
8.9.1 Fallback with secondary indexes
Secondary indexes are rebuilt as part of the fallback process for the indexed
database. Fallback uses the same process that you use when reorganizing the
non-HALDB database. This can be the execution of Prefix Resolution, HISAM
Unload, and HISAM Reload, or the execution of IMS Index Builder, or the use of
any tool that builds secondary indexes from the indexed database.
If your non-HALDB databases used virtual pairing, the fallback process does not
allow you to fall back to your previous definitions. The migration to HALDB
required a conversion to physical pairing. Fallback maintains physical pairing.
Your new non-HALDB DBDs must include physical pairing definitions. The
additional space required for the physically paired segments could prevent a
fallback.
Note: These examples do not include provisions for fallback. You should
include them. As a minimum, you should be prepared to restore the database
to its state before the migration. This may be accomplished by making image
copies of the non-HALDB database data sets, copying the RECONs, and
saving copies of the non-HALDB DBDs. These copies could be used to
restore the database. See 8.9, “Fallback to non-HALDB” on page 126, for
information on falling back and including updates made while the database
was HALDB.
130 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
//SYSUDUMP DD SYSOUT=*
//DFSVSAMP DD DSN=IMSPSA.IM0A.PROCLIB(DFSVSM0N),DISP=SHR
//SYSIN DD *
DBNAME=NORDDB NBR=4
We run our first analysis using a control statement with NBR=4. This gives the
key ranges and statistics for four partitions of equal size. Example 9-2 shows the
output of this execution of DFSMAID0.
The main purpose of the first run is to get a rough idea of the possible partition
characteristics.
DFSMAID0 SYSIN:
" DBNAME=NORDDB NBR=04
"
nbr = 4 ;
-------------------------------------------------------------------------------
-
-------------------------------------------------------------------------------
-
partition 1 :
minimum key =
maximum key =
-------------------------------------------------------------------------------
-
partition 2 :
minimum key =
maximum key =
-------------------------------------------------------------------------------
-
partition 3 :
minimum key =
maximum key =
-------------------------------------------------------------------------------
-
partition 4 :
minimum key =
132 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
+0000 f0f0f1f6 f0f8f0f0 f0f0f2f2 f0f9 |00160800002209 |
maximum key =
-------------------------------------------------------------------------------
-
sum of partitions:
segments bytes prefix-incr length-incr
1) 'NORDER ' 193078 4633872 1544624 0
SUM) 193078 4633872 1544624 0
-------------------------------------------------------------------------------
The report provides the minimum and maximum key values, the number of the
segments, and the number of the bytes needed for each partition. It also provides
a summary for all the partitions.
Another way to run the Migration Aid utility is to specify the maximum size in
bytes for each partition. Then the utility gives the number of partitions needed
and the key ranges. This is done by using the control statement MAX=nnnn. If
you specify a value that is larger than 2147483647, then 2147483647 (2G - 1)
will be used. This method could be useful, for example, when you want a partition
to fit on a single volume. In our next test, when we specify MAX=1000000. This
produces seven partitions for our database. We could have guessed this by
summing the bytes and prefix-incr values from the first report and dividing that by
one million.
For the purposes of this example, we think that four is the suitable number of
partitions, but we want to have high keys to be set based on warehouse
numbers. Our database has the warehouse number in the first four bytes of the
key. These values range from 0001 to 0021. We want the partitions to be about
the same size. We take the maximum key values for the partitions from the first
run and round them to the closest warehouse limit. We run the Migration Aid
utility one more time.
This job produces a report that shows the number of segments and the number
of bytes needed for each of the four partitions. Note that we only specify three
values for the high keys. The last partition has the maximum value for its high key
(16 bytes of X’FF’). Example 9-3 shows the output of the job.
DFSMAID0 SYSIN:
"KR=C'00059999999999'
"
"KR=C'00109999999999'
"
"KR=C'00159999999999'
"
-------------------------------------------------------------------------------
------------------------------------------------------------------------------
partition 1 :
minimum key =
134 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
maximum key =
-------------------------------------------------------------------------------
partition 2 :
minimum key =
maximum key =
-------------------------------------------------------------------------------
-
partition 3 :
minimum key =
maximum key =
-------------------------------------------------------------------------------
partition 4 :
minimum key =
maximum key =
-------------------------------------------------------------------------------
sum of partitions:
segments bytes prefix-incr length-incr
1) 'NORDER ' 193078 4633872 1544624 0
SUM) 193078 4633872 1544624 0
-------------------------------------------------------------------------------
136 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
/*
//DFSCTL DD *
SBPARM ACTIV=COND
/*
From the SYSPRINT, we check the number of unloaded segments and the return
code. These are shown in Example 9-5.
Example 9-7 on page 138 shows the SYSPRINT from the successful deletion of
the database information from the RECONs.
Note: We discard the DBD for the primary index. The primary index definition
is generated from the information in the PHIDAM DBD.
Example 9-8 shows the DBD source for the database before it is converted to
HALDB.
138 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
FIELD NAME=NOOID,BYTES=8,START=7,TYPE=C
*
LCHILD NAME=(INDXSEG,NOIX),PTR=INDX
*
DBDGEN
FINISH
END
Example 9-9 shows the DBD source for the database after it is converted to
HALDB.
We use IDCAMS DEFINE for our primary index clusters. We use the
information from the RECOMMENDED VSAM DEFINE CLUSTER
PARAMETERS in the SYSPRINT output of the PHIDAM DBDGEN. We
specify our desired CI sizes in the DEFINEs.
We use IDCAMS DEFINE for our ILDSs. Since the NORDDB database has
no secondary indexes or logical relationships, the ILDS space allocations can
be very small. Example 9-10 shows our DEFINE statements for an ILDS.
140 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//PRINTDD DD SYSOUT=*
//DFSURCDS DD DISP=OLD,DSN=IMSPSA.IMS0.DFSURCD5
//DFSVSAMP DD DSN=IMSPSA.IM0A.PROCLIB(DFSVSM0S),DISP=SHR
//SYSIN DD *
DBIL=NORDDB
/*
NORDER 1 193,078
We do not image copy the ILDS or primary index data sets. These data sets do
not use image copies for recoveries. Instead, if they are lost they are rebuilt using
the HALDB Index/ILDS Rebuild utility (DFSPREC0). There are no image copy
needed flags for these data sets.
9.1.12 ACBGEN
Finally, we run an ACBGEN. The ACBGEN process for HALDB is the same as for
non-HALDB databases.
142 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
These are output files. The DFSWRK01 data set contains the records used to
load the HALDB secondary index. The DFSSRT01 data set contains the sort
control statements used to sort the DFSWRK01 data set before the reload of
the HALDB secondary index.
Example 9-14 shows the JCL used for the unload step.
If there were more than one secondary index, we would include more
DFSWRKnn and DFSSRTnn DD statements.
4. Sort the secondary indexes files.
We sort the DFSWRK01 output file from the previous step. The records in the
DFSSRT01 file are used as sort control statements in SYSIN. The sorted
output file will be used as an input to the load of the secondary index.
Example 9-17 on page 145 shows the DBD source for the secondary index
before conversion to HALDB.
144 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Example 9-17 DBD source for CUSTSI non-HALDB secondary index
***********************************************************************
* SECONDARY INDEX DATA BASE, INDEXED ON CWID, CDID, CLAST, CFIRST
***********************************************************************
DBD NAME=CUSTSI,ACCESS=INDEX
*
DATASET DD1=CUSTSIDD,DEVICE=3390,SIZE=20480
*
SEGM NAME=CUSTNAME,BYTES=42,PARENT=0
FIELD NAME=(CNAMEKEY,SEQ,U),START=1,BYTES=42
* WWWWDDLLLLLLLLLLLLLLLLFFFFFFFFFFFFFFFFCCCC
* 4 2 16 16 4
*
LCHILD NAME=(CUSTOMER,CUSTDB),INDEX=XCNAME,PTR=SNGL
*
DBDGEN
FINISH
END
Example 9-18 shows the DBD source for the customer database after
conversion to HALDB. The original versions of changed statements have
been converted to comments. Our original database has a specialized
randomizer that is sensitive to the number of RAPs in the database. Since we
do not need a specialized randomizer, we change to DFSHDC40.
Example 9-19 shows the DBD source for the secondary index after
conversion to HALDB. The original versions of changed statements have
been converted to comments.
8. Define partitions for the PHIDAM database and PSINDEX using PDU.
9. Allocate PHIDAM and PSINDEX data sets.
10.Initialize PHIDAM and PSINDEX partitions.
11.Load PHIDAM and PSINDEX databases.
We can run the HD Reloads for the PHIDAM database and the PSINDEX in
parallel. The input to the reload for the PSINDEX is the sorted file produced in
step 4.
146 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
12.Image copy the PHIDAM and PSINDEX data sets.
13.ACBGEN.
Example 9-22 shows the DBD definition for the HALDB PHIDAM database.
148 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
9. Initialize the HALDB partitions.
10.Load the HALDB database.
11.Image copy the HALDB database data sets.
12.ACBGEN.
IMS HALDB Conversion and Maintenance Aid creates DBD and DBRC
definitions, allocates HALDB partition data sets, and creates the conversion JCL.
Batch functions support the conversion process. This chapter provides an
overview of the product and examples of its use.
The HALDB Conversion and Maintenance Aid Version 2 provides the following
additional functions:
It can create DBD source from the DBD load library. This allows the DBD
source libraries to be discarded.
It provides a stand-alone EPS pointer healer utility. This allows you to heal all
secondary index pointers after a reorganization.
It has a maintenance function that helps in maintaining (splitting or combining
partitions) your HALDB database once it has been converted from full
function.
It can improve the performance when initially loading databases with the
secondary indexes. When a user application program creates a HALDB
database, the product provides a capability not to insert secondary indexes
immediately. They are saved in temporary files during the load process. Once
the database is loaded, all indexes are sorted and loaded to the index KSDS
file(s).
It provides a capability to allow initial load programs to insert logical child
segments. That is, it removes the normal HALDB restriction that does not
152 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
allow logical child segments to be inserted when a user application program is
initially loading a database with logical relationships.
It provides a function that can be used to enable BA status codes for
applications that do not issue the INIT STATUS call. This will prevent those
applications from abending with a U3303 abend. The second feature of this
function allows you to define a retry mechanism to retry the call after receiving
a BA status code. The third feature limits the BA handling to specified
databases only.
Section 10.4, “Additional functions” on page 176, describes these new functions.
Chapter 10. Using the HALDB Conversion and Maintenance Aid 153
– It generates the new DBD for the database(s). When converting the DBD,
IMS HALDB Conversion and Maintenance Aid is able to handle virtual
pairing to physical pairing conversion and multiple data set groups. The
user has the choice to keep groups or combine them. IMS HALDB
Conversion and Maintenance Aid also saves the old definitions.
– It allocates the database data sets. It uses the data from reading the old
database for sizing. It allows the user to adjust sizes and other
parameters.
– It initializes the partitions.
– It creates the jobs for the reload and is able to select between MIGRATE
and MIGRATX based on whether the converted database(s) has
secondary indexes or not.
– It creates image copies.
– It creates an optional EPS pointer heal job that you can run.
For all the jobs, the JCL is presented to the user. The user submits the jobs.
The jobs maybe modified before they are submitted. An ISPF panel informs
the user of the end of each phase.
5. Phase 5 is a reminder that after databases are converted, ACBGENs and
online changes are required.
IMS HALDB Conversion and Maintenance Aid does not perform those
actions.
154 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
10.2.1 Modifying the startup CLIST
A sample CLIST for invoking the HALDB Conversion and Maintenance Aid in an
ISPF environment is provided. You can find the sample CLIST in the product
sample library hlq.SIHCSAMP where hlq is the high-level qualifier specified
during the product installation. The CLIST has the name IHCXHAL in the sample
library.
You may want to copy this CLIST to a CLIST library that is already included in
your TSO allocation and modify it there. In the sample CLIST, the only things you
need to modify are the ISPF library names for the product target libraries unless
you are using the product default names. The names in the CLIST must match
the target library names.
By copying the CLIST to the general CLIST library, the start command is
available to all users who have the library defined in their TSO allocation. Then
you do not have to specify the library name where the CLIST resides when using
the start command. In our case we copied the CLIST into library
SYS1.OS390.CLIST and gave the name $IHCXHAL for it. The other way is to
modify the CLIST in the SIHCSAMP library and specify the library name in the
start command when starting the tool:
ex ‘hlq.SIHCSAMP(IHCXHAL)’
Note: The HALDB Conversion and Maintenance Aid load library must be APF
authorized before running this allocation job.
Chapter 10. Using the HALDB Conversion and Maintenance Aid 155
Define a conversion project.
Process a conversion project.
To start the IMS HALDB Conversion and Maintenance Aid, use the CLIST that
you had modified as described in the 10.2.1, “Modifying the startup CLIST” on
page 155. In our case we can start the tool by using the command $IHCXHAL
from the ISPF command option or from any TSO command line by entering the
command:
TSO $IHCXHAL
After selecting option 1 you get the panel about environment maintenance
(Figure 10-2 on page 157), where you choose option 2 to add a new
environment.
156 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Figure 10-2 Environment maintenance
Now you see a panel where you have to enter a name and a description for your
environment. The next panel (Figure 10-3) shows an example.
In the next step you set definitions for your project (see Figure 10-4 on
page 158).
Chapter 10. Using the HALDB Conversion and Maintenance Aid 157
Figure 10-4 Project definition
To set up an environment, the tool must know which data sets it should use
(Figure 10-5). Specify your RESLIB, and perhaps a second data set for user
program library (user exits, randomizer, etc.). For MACLIB enter the name of your
MACLIB, and for LOADLIB the name of the IHC load library. Enter the data set
name and member name that contains your DFSVSAMP member. Specify your
MDALIB that is used to extract data set names of the databases and where the
RECON MDA are located if you want them dynamically allocated. Otherwise
specify the RECONs you want to use in the next panel. After that you see a panel
where you define your DBDLIBs (up to nine).
158 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
The HALDB Conversion and Maintenance Aid is designed to run with preset
defaults. However, you can override defaults to accommodate the needs of your
environment. The following panels describe available options. You can get help
by pressing PF1. Default conversion rules are shown in Figure 10-6.
Chapter 10. Using the HALDB Conversion and Maintenance Aid 159
If you choose option 3 for any field, the value for that option will be Ask during
Conversion. These rules apply to all of your projects in the selected environment
if you do not change them in your project definition.
The Save Source Statements panel is used to enable the saving of source
statements (Figure 10-7). This function saves the source for new DBDs and the
IDCAMS used for allocating the data sets into the specified data sets. These data
sets must be allocated before making the selection.
You can also specify the member name for the IDCAMS statements. With option
1 (DBDNAME) all IDCAMS statements for that DBD become part of a member
with this name. With option 2 (partition name) all statements of that partition are
included in a member with the partition name. With option 3 (DD name) the
IDCAMS statement per DD name is saved. Option 3 provides maximum flexibility.
We recommend that you save the IDCAMS statements. This allows you to delete
and allocate the data sets very easily. It is not necessary to save the DBD source
because you have the capability to see and reassemble it by choosing the
appropriate panel option.
The Partition Definition Rules (Figure 10-8 on page 161) panel sets partition
defaults at data collection time.
160 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Figure 10-8 Partition Definition Rules
Chapter 10. Using the HALDB Conversion and Maintenance Aid 161
Additional Partitioning Layouts to be created?
This function is available for the main database only.
Next you have to define the partition naming rules (Figure 10-9). A unique
partition name must be created for each partition in your installation. The tool
does not check the validity.
With Partition DSN specify the left-most portion of the partition data set name (for
naming conventions see 1.9, “Naming conventions” on page 17), which applies
to all data sets in your environment.
Now some space allocation panels follow. The first one defines the space
allocation rules for PHDAM and PHIDAM databases (Figure 10-10 on page 163).
In these panels the term cloning means that the old definitions should be taken.
Similar panels for PSINDEX data sets and ILDS follow (not shown).
162 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Figure 10-10 Rules for PHDAM and PHIDAM
JCL defaults for the JOB statement you submit for all conversion JCLs must be
entered.
If you have the tools High Performance Unload or High Performance Reload you
may use them instead of the standard HD Unload and Reload utilities. One panel
offers the selection of the Unload utility or HP Unload (Figure 10-11). A similar
one offers the selection of the Reload utility or HP Reload.
Chapter 10. Using the HALDB Conversion and Maintenance Aid 163
The following panel is for the utility set up for backout (Figure 10-12). It provides
some defaults for the standard Image Copy utility (DFSUDMP0). These are the
number of copies you want and the naming scheme.
Now the environment is set and you can start defining your project.
164 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Figure 10-13 Conversion Full Function to HALDB
Next we follow the guided panel tour to set some other defaults before returning
to the Conversion panel. Basically you see the panels you already know from
defining the environment. Now we use them for determining the values for our
individual project. We may change the shown defaults or not. For example, if for
this particular database we need a partition selection exit routine, we change the
conversion default to Selection Exit: 1 (according to Figure 10-6 on page 159; 1
means YES). Then the following panel is shown (Figure 10-14 on page 166). We
may specify which part of the root key the selection exit should use (offset and
length) and how the partitions are to be defined.
Chapter 10. Using the HALDB Conversion and Maintenance Aid 165
Figure 10-14 Specify a Partition Selection Exit
Figure 10-15 Key strings defined for CUSTDB partition selection exit
One other default we might want to change for a specific database is additional
layouts. Perhaps we do not know the partition ranges and want to check which
166 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
would be the best choice. We select the appropriate row in Figure 10-8 on
page 161 and specify 1 to view the predefined partition layout or create
additional ones. We see a selection panel (Figure 10-16) and we must then
decide which layout to use.
Our database CUSTDB should have four partitions, so the layout stored looks
like Figure 10-17.
We will use the stored layout. We select a new project, give it a name and a
description and specify a tracking and staging KSDS (DSN, space, volser), which
Chapter 10. Using the HALDB Conversion and Maintenance Aid 167
we allocate by generated JCL. Back in the Conversion panel we select function 3
to display our projects and select the appropriate one (Figure 10-18).
With option 0 we may check all settings and eventually change them. However,
we want to continue our project and select option 1, which gives us a list of DBDs
to be selected. CUSTDB is the database we wish to convert, so we select it. We
can select one DBD after the other. If we select the corresponding secondary
index we get the message that it has already been selected because this tool
automatically selects all related databases.
168 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
After the selection we will be presented with a panel that shows the DBDs
indicated (Figure 10-20).
We must now press the END key to display the continuation, which is the
confirmation panel of our DBD selection. We specify Y for selection complete (N
if we want to add more DBDs). When we have confirmed our selection, the
following panel gives us the name of the unload data set (Figure 10-21).
Next we select whether we want to specify the high keys, a certain number of
partitions, or a certain size for our partitions. In our example we simply say we
want four partitions (Figure 10-22 on page 170).
Chapter 10. Using the HALDB Conversion and Maintenance Aid 169
Figure 10-22 Select partition layout
Now the setting is done and JCL for the unload is generated. We check and
submit it (Example 10-1).
170 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
INDSEL(2) INDSIZE(1024) -
INDPART(1) INDMIN(1024) -
DBREC(5000)
/*
Most generated JCLs also contain an additional step (not shown in our
examples) that keeps track of the status of the project in the KSDS we defined
(10.3.2, “Define a project” on page 164).
Pressing the End key leads to the Project Checkpoint panel (Figure 10-23),
which shows the status of the project. We are asked if we want to start the next
phase (called implementation). We enter Y for yes.
Now a series of panels with generated JCLs is shown to us, which we have to
submit. The sequence is:
1. JCL for DELETE.DB
2. JCL for DBDGEN
3. JCL for saving the source (if we had specified SAVE SOURCE as default)
4. JCL for INIT.DB and INIT.PART
5. JCL for deletion and allocation of the data sets
6. JCL for saving the source (if we had specified SAVE SOURCE as default)
7. JCL for initialization
8. JCL for reload
9. JCL for image copy
Not all of the jobs are shown here. The first does a DELETE.DB of CUSTDB,
which is still non-HALDB in the RECONs, so all related information is removed
from the RECONs. Then the new HALDB DBD is created by DBDGEN. You may
Chapter 10. Using the HALDB Conversion and Maintenance Aid 171
see the source in your save file or by choosing option 7 (other utilities) of the
main panel and then selecting option 1 (show DBD source). The next step
registers the HALDB in the RECONs (Example 10-2).
172 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
KEYSTRNG(X'FF')
After registering the database and partitions, the corresponding data sets must
be allocated. Example 10.3 on page 155 shows the statements for the data data
set and the ILDS data set of partition 1, and the allocation JCL for the secondary
index data set. The allocation statements for the other partitions are similar.
The next step sets the PINIT flags with a CHANGE command and initializes all
partitions (Example 10-4) with the DFSUPNT0 utility.
Chapter 10. Using the HALDB Conversion and Maintenance Aid 173
// DD DISP=SHR,DSN=IMSPSA.IMS0.SDFSRESL
//RECON1 DD DISP=SHR,DSN=JOUKO1.RECON1
//RECON2 DD DISP=SHR,DSN=JOUKO1.RECON2
//RECON3 DD DISP=SHR,DSN=JOUKO1.RECON3
//DFSRESLB DD DISP=SHR,DSN=IMSPSA.IMS0.SDFSRESL
//IMS DD DISP=SHR,DSN=JOUKO1.DBDLIB
//MSGPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//IHCSYSIN DD *
RUN PGM(IHCZDBRC)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
CHANGE.DB DBD(CUSTDB0) PINIT
CHANGE.DB DBD(CUSTDB1) PINIT
CHANGE.DB DBD(CUSTDB2) PINIT
CHANGE.DB DBD(CUSTDB3) PINIT
CHANGE.DB DBD(CUSTSI0) PINIT
//INIT EXEC PGM=DFSUPNT0,
// COND=(4,LE),
// REGION=50M
//STEPLIB DD DISP=SHR,DSN=IHC.V2PTF2.SIHCLOAD
// DD DISP=SHR,DSN=IMSPSA.IMS0.SDFSRESL
//DFSRESLB DD DISP=SHR,DSN=IMSPSA.IMS0.SDFSRESL
//IMS DD DISP=SHR,DSN=JOUKO1.DBDLIB
//RECON1 DD DISP=SHR,DSN=JOUKO1.RECON1
//RECON2 DD DISP=SHR,DSN=JOUKO1.RECON2
//RECON3 DD DISP=SHR,DSN=JOUKO1.RECON3
//DFSVSAMP DD DISP=SHR,
// DSN=IMSPSA.IM0A.PROCLIB(DFSVSM0R)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
CUSTDB
CUSTSI
174 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
//STEPLIB DD DISP=SHR,DSN=IHC.V2PTF2.SIHCLOAD
// DD DISP=SHR,DSN=IMSPSA.IMS0.SDFSRESL
//DFSRESLB DD DISP=SHR,DSN=IMSPSA.IMS0.SDFSRESL
//IMS DD DISP=SHR,DSN=JOUKO1.DBDLIB
//RECON1 DD DISP=SHR,DSN=JOUKO1.RECON1
//RECON2 DD DISP=SHR,DSN=JOUKO1.RECON2
//RECON3 DD DISP=SHR,DSN=JOUKO1.RECON3
//DFSURGU1 DD DISP=OLD,
// DSN=IMSPSA.IM0A.CUSTDB.UNLOAD.CUSTDB
//SYSPRINT DD SYSOUT=*
//IHCSYSIN DD *
RELOAD DBD(CUSTDB) UNLFILE(DFSURGU1)
The job output says Image copy needed for..., so the next job must be an
image copy (DFSUDMP0). We check and submit it. After the image copies of the
main database have been performed, we are asked whether we want to do an
image copy of our secondary index. If we choose NO, we must have a tool to
build the secondary index. We submit the generated image copy JCL and then
again we are presented with a checkpoint panel, which asks whether we want to
start the next phase: Post Processing.
After entering YES we see the following panel (Figure 10-24). This is just a
reminder and lists the tasks that are to be performed by the user.
If all shown tasks are performed, the HALDB database may be used and this
conversion project is finished. A last panel asks if the project data set should be
kept, reused, or deleted.
Chapter 10. Using the HALDB Conversion and Maintenance Aid 175
10.4 Additional functions
The HALDB Conversion and Maintenance Aid Version 2 for z/OS is a successor
product to the IMS HALDB Conversion Aid Version 1. As the name implies, the
new functions are primarily for the maintenance of databases after they have
been converted to HALDB. They include the capability to split or consolidate
HALDB partitions (choose option 5 of the main panel Figure 10-1 on page 156).
Other functions include back up, recovery, unload, and reload for individual
partitions, as well as INDEX pointer healing (choose option 6 of the main panel).
For example, our current HALDB NORDDB with a partition exit routine has four
partitions. Now we think that perhaps six partitions would be better, but which
keystrings should we use? We choose option 5, make our definitions, enter the
new keystrings, and submit the JCL generated. Example 10-6 shows the
analysis based on the new partitions. We can see that we managed to select
quite a good keystring, since all the partitions are almost equal in size. Only the
last partition has less segments, but this change may be done for the preparation
for the new data to be added in the last partition. You are asked if you want to
continue with an unload and if you enter YES, the unload JCL is generated.
Part Roots % All Segments % Prefix Bytes % Data Bytes % Total Bytes %
Total 193,078 100.00 193,078 100.00 3,475,404 100.00 2,703,092 100.00 6,178,496 100.00
1 36,960 19.14 36,960 19.14 665,280 19.14 517,440 19.14 1,182,720 19.14
Key: 0004
F0F0F0F4
2 36,582 18.94 36,582 18.94 658,476 18.94 512,148 18.94 1,170,624 18.94
Key: 0008
F0F0F0F8
3 37,021 19.17 37,021 19.17 666,378 19.17 518,294 19.17 1,184,672 19.17
Key: 0012
F0F0F1F2
4 36,901 19.11 36,901 19.11 664,218 19.11 516,614 19.11 1,180,832 19.11
Key: 0016
F0F0F1F6
5 36,614 18.96 36,614 18.96 659,052 18.96 512,596 18.96 1,171,648 18.96
Key: 0020
F0F0F2F0
6 9,000 4.66 9,000 4.66 162,000 4.66 126,000 4.66 288,000 4.66
Key: ÿÿÿÿ
FFFFFFFF
Then a job with CHANGE commands for the old partitions and INIT commands
for the new partitions is created (Example 10-7 on page 177).
176 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Example 10-7 Defining the new partitions
//DBRC EXEC PGM=IHCZUTIL,
// COND=(4,LE),
// REGION=50M
//STEPLIB DD DISP=SHR,DSN=IHC.V2PTF2.SIHCLOAD
// DD DISP=SHR,DSN=IMSPSA.IMS0.SDFSRESL
//RECON1 DD DISP=SHR,DSN=JOUKO1.RECON1
//RECON2 DD DISP=SHR,DSN=JOUKO1.RECON2
//RECON3 DD DISP=SHR,DSN=JOUKO1.RECON3
//DFSRESLB DD DISP=SHR,DSN=IMSPSA.IMS0.SDFSRESL
//IMS DD DISP=SHR,DSN=JOUKO1.DBDLIB1
//MSGPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//IHCSYSIN DD *
RUN PGM(IHCZDBRC)
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
CHANGE.PART DBD(NORDDB) PART(NORDDB0) -
KEYSTRNG(X'F0F0F15EF0F0F45EF0F0F0F4') -
DSNPREFX(IMSPSA.IM0A.NORDDB.NORDDB)
CHANGE.PART DBD(NORDDB) PART(NORDDB1) -
KEYSTRNG(X'F0F0F15EF0F0F45EF0F0F0F8') -
DSNPREFX(IMSPSA.IM0A.NORDDB.NORDDB)
CHANGE.PART DBD(NORDDB) PART(NORDDB2) -
KEYSTRNG(X'F0F0F15EF0F0F45EF0F0F1F2') -
DSNPREFX(IMSPSA.IM0A.NORDDB.NORDDB)
CHANGE.PART DBD(NORDDB) PART(NORDDB3) -
KEYSTRNG(X'F0F0F15EF0F0F45EF0F0F1F6') -
DSNPREFX(IMSPSA.IM0A.NORDDB.NORDDB)
CHANGE.PART DBD(NORDDB) PART(NORDDB4) -
KEYSTRNG(X'F0F0F15EF0F0F45EF0F0F2F0') -
DSNPREFX(IMSPSA.IM0A.NORDDB.NORDDB)
CHANGE.PART DBD(NORDDB) PART(NORDDB5) -
KEYSTRNG(X'F0F0F15EF0F0F45EFF') -
DSNPREFX(IMSPSA.IM0A.NORDDB.NORDDB)
As already shown in the conversion example, jobs follow that allocate the data
sets, initialize the partitions, perform the reload, and all image copies needed.
Option 7, other utilities, provides such functions as the Partition Selection Exit
Test utility, OSAM Multi-volume, and the Check "BA" Status Code Table. Most are
self-explanatory, so only a few words about the last function are added here. You
may enable BA status codes for applications that do not issue the INIT STATUS
call. The tool provides an exit. You determine for which programs this call should
be created and you specify the databases for which the programs should wait if
Chapter 10. Using the HALDB Conversion and Maintenance Aid 177
they get a BA status code. For the mechanism to retry the call after receiving a
BA, two parameters may be specified, wait time and retry count. The retry is
made after wait time has exceeded, and the count tells how many times a retry
should be attempted. This function only applies to BMP and MPP regions and for
GU or GHU calls.
Option 8 (Figure 10-25) allows you to perform the following DBRC functions,
where the first three are LIST commands.
If you want the definitions of your HALDB partitions copied into another RECON
environment, choose Clone Partition Definition. This does not transfer the
content of your database. Specifying your DBDLIB and the new RECONs on the
given panels leads you to the following panel (Figure 10-26).
Pressing Enter will generate the needed JCL (Example 10-8 on page 179).
178 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Example 10-8 Clone partition definitions
//*-----------------------------------------------------------------
//* CREATE DBRC COMMANDS
//*-----------------------------------------------------------------
//CRE EXEC PGM=IHCHALDB,
// REGION=60M
//STEPLIB DD DISP=SHR,DSN=IHC.V2PTF2.SIHCLOAD
// DD DISP=SHR,DSN=IMSPSA.IMS0.SDFSRESL
//DFSRESLB DD DISP=SHR,DSN=IMSPSA.IMS0.SDFSRESL
//IMS DD DISP=SHR,DSN=JOUKO1.DBDLIB1
//RECON1 DD DISP=SHR,DSN=JOUKO1.RECON1
//RECON2 DD DISP=SHR,DSN=JOUKO1.RECON2
//RECON3 DD DISP=SHR,DSN=JOUKO1.RECON3
//MSGPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//IHCSYSIN DD *
COPYDBRC DBD(NORDDB) -
DSNPREF(IMSPSA.TEST) -
DSNDBD(YES) -
INCLIND(YES) -
TODD(DBRCOUT)
/*
//DBRCOUT DD DISP=(,PASS),SPACE=(TRK,(1,1)),UNIT=SYSALLDA
//*---------------------------------------------------------
//* APPLY TO OTHER DBRC
//*---------------------------------------------------------
//DBRC EXEC PGM=DSPURX00,REGION=50M,COND=(4,LE)
//STEPLIB DD DISP=SHR,DSN=IMSPSA.IMS0.SDFSRESL
//RECON1 DD DISP=SHR,DSN=JOUKO1.NEW.RECON1
//RECON2 DD DISP=SHR,DSN=JOUKO1.NEW.RECON2
//RECON3 DD DISP=SHR,DSN=JOUKO1.NEW.RECON3
//DFSRESLB DD DISP=SHR,DSN=IMSPSA.IMS0.SDFSRESL
//IMS DD DISP=SHR,DSN=JOUKO1.DBDLIB1
//SYSPRINT DD SYSOUT=*
//SYSIN DD DISP=(OLD,DELETE),DSN=*.CRE.DBRCOUT
The HALDB Conversion and Maintenance Aid helps you implement the database
in another RECON environment if you choose Copy Partitions to a different
RECON. This will create cloned partition definitions in another RECON, and also
transport full image copies to these RECON data sets. It will resolve the
problems with partition IDs as they are described in 11.7.2, “Using image copies”
on page 207. Then you have to perform a timestamp recovery with
GENJCL.RECOV and test your database.
Chapter 10. Using the HALDB Conversion and Maintenance Aid 179
180 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Part 3
Part 3 Application
considerations
In this part we discuss potential application changes and opportunities with
HALDB. We describe some application programming changes that you may need
to make, and other changes that you may want to implement.
We discuss the differences that HALDB creates for test environments and the
copying of databases.
We also explain why you might want to change applications to take advantage of
some HALDB capabilities. These capabilities include processing partitions in
parallel, processing individual partitions, and handling unavailable partitions.
We explain how to create test environments for HALDB and how to copy HALDB
databases between IMS environments.
The only required change is for application programs that initially load logical
children in logically related databases. This is not allowed with HALDB. If you
have an initial load application program that inserts logical child segments, it
must be modified. We describe these modifications in “Initial loads of databases
with logical relationships” on page 188.
Many installations load HDAM databases in RAP sequence. This loads the
records in physical sequence in the database. This is done by sorting the input
records into the order that the randomization routine creates. To do the same
thing with PHDAM, one would have to sort the records within each partition. With
PHDAM, randomization is done within a partition, not across partitions. That is,
the partition is selected first and then randomization is done. Each partition could
have different randomization parameters. In some cases, the techniques used
with HDAM might not work for PHDAM. For example, the use of different
randomization routines for different partitions would prevent a general sort for the
entire database. The IBM High Performance Load (HP Load) product includes a
Physical Sequential Sort for Reload (PSSR) program. PSSR may be used to sort
records in RAP sequence. It includes HALDB support to sort records for a
partition, a set of partitions, or all partitions in a database.
184 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
sequences would also be valid as long as they load records in a partition in key
sequence.
You may be able to load partitions in parallel by making only minor changes to
the load process you use with a non-HALDB database. Figure 11-2 on page 186
illustrates a situation where the original load program does not have to be
modified. Its input file is split into multiple files. There is a separate file for each
partition’s key range. The original program is executed multiple times. Each
execution reads the input file for its partition’s key range.
Create
Create load multiple
input file load input
files
Non-HALDB HALDB
Each partition may be loaded only once. When you load partitions in parallel, two
jobs cannot load records in the same partition. An attempt to load more records
in a partitions that has already been loaded will result in the original records
being lost.
When source segments are loaded in HALDB databases, their secondary index
entries are inserted in the secondary index partitions. The buffer pools used by
the load program must include buffers for the secondary indexes. The secondary
index partitions must have been initialized previously.
186 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Restriction: Partition initialization turns the image copy needed flags on for
data sets in the partitions.
When we wrote this book, initial loads of indexed databases failed if the image
copy needed flags were on for secondary index partition data sets. IBM plans
to change this with maintenance to IMS Version 8. The maintenance will allow
authorizations for initial loads when the image copy needed flags are on for
secondary index data sets.
Initial loads do not create entries in the ILDS. They are not needed because any
secondary index entries will have accurate RBA pointers in their extended pointer
sets (EPSs).
BLDSNDX parameter
APARs PQ55840 for IMS Version 7 and PQ56463 for IMS Version 8 added a
capability to eliminate the building of secondary indexes by initial load programs.
This is invoked by including a BLDSNDX parameter on the OPTIONS statement
in the DFSVSAMP data set. Example shows a use of this statement.
If you include a BLDSNDX=NO parameter, you must build your secondary index
by other means. You can use the IMS Index Builder tool to do this.
When you use BLDSNDX=NO, the secondary index partitions are not authorized
and their data sets are not allocated.
The use of BLDSNDX=NO and the IMS Index Builder may shorten the load and
index creation process. When BLDSNDX=NO is not used, inserts in secondary
indexes are random. This could lengthen the load process considerably. IMS
Index Builder reads the loaded database, creates index entries without writing
them to the secondary indexes, sorts the entries in secondary index key
sequence, and then writes them to the secondary indexes in a sequential
process. When you have many secondary index entries this process may require
less elapsed time.
If you have a database that you initially load as part of your normal operations
and it contains logical children, you will have to modify your load process. The
logical children must be inserted in the database in a different job or step. This
program must use PROCOPT=I or A, not PROCOPT=L.
Figure 11-3 illustrates a logical relationship. Logical child LC2 in database DBX
points to logical parent LP2 in database DBY. Logical child LC1 in database DBY
points to logical parent LP1 in database DBX. LC2 and LC1 are paired logical
children.
DBX DBY
LP2
LP1 LC1
LC2
188 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
5. Execute the Prefix Update utility. This utility reads the output of the Prefix
Resolution utility and updates the pointers and counters for the logical
relationships.
Steps 3 and 4 can use modified versions of the application programs used in
steps 2 and 3 for the non-HALDB process. The modifications would eliminate the
inserts of the logical children. The modifications for one of these programs
should also save the information about the logical children. This information is
needed by the update program used in step 5. For example, the modification of
the program that loads DBX could write a file with a record for each LC2
segment. The record would include the concatenated key and the data for the
segment. Then the program in step 5 could read this file and insert the LC2
segments using a PCB with PROCOPT=I.
Figure 11-4 on page 191 illustrates a situation where parallel processing cannot
be done. Programs that update different partitions of the target database update
all of the partitions of the secondary index. For example, an insert of a target
database record with a key of CML might create a secondary index with a key of
632. An insert of a record with a key of RZL might create a secondary index with
a key of 980. The target database records are in different partitions but their
secondary index entries are in the same partition of the secondary index. Similar
situations exist with logical relationships.
190 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Secondary Index
000-499 500-999
Target Database
In some cases the use of partition selection exit routines can make parallel
processing of partitions with secondary indexes or logical relationships feasible.
Figure 11-5 illustrates as example of this. The keys of the target database and
the secondary index have some common data. The third byte of the target
database key contains a one-byte code that also appears in the second byte of
the secondary index key. The valid values for code are A, B, and C. You can write
partition selection exit routines that assign records to partitions based only on
this code. This will cause all secondary index entries pointing to the partition of
the target database to reside in the corresponding partition of the secondary
index.
Secondary Index
Target Database
You will need to restrict your program to one partition or a set of partitions. This
can be done easily with the HALDB control statement. This statement limits a
PCB to one partition of a database. The specification of this statement and its
use are described in 11.3, “Restricting a PCB to one partition” on page 193. If
you wish to use a PCB to access multiple partitions, you cannot use the HALDB
control statement. Instead, your program must understand which records reside
in these partitions and access only those records. Information about which
records are in which partitions is not available from control blocks or calls that the
application may use. You must devise a scheme to provide this information to
your programs. We will not discuss this further. It is much easier to design
systems so that application programs either have access to all partitions or are
limited to only one partition.
Your current program may read an input file. If you wish to modify it so that
multiple instances of the program process different partitions, you need to split
the input file. Each instance should read a different file. Similarly, if your current
program reads a database to get its input, different instances of the program
need to read different parts of the database.
Your current program may produce output files or reports. If you create multiple
instances of the program, you will need to consolidate output files or reports from
the separate programs.
You may need to modify your program so that it can handle situations when a
partition is not available. An example of this requirement is a program that
typically reads records from a partition, but occasionally must access a record
out of this range. This is explained in Appendix 11.4, “Handling unavailable
partitions” on page 197.
192 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
the partition so that it may begin with it. It must also know the highest possible
key in the partition so that it can determine when to terminate. If the highest
possible key does not exist, the program will attempt to cross to the next partition.
The program may not have authorization to process this partition. This could
occur with a batch program not using block level data sharing. Another program
could have authorization for the next partition. This problem is avoided when the
HALDB control statement is used.
//DFSHALDB DD *
HALDB PCB=(nnn|dddddddd,ppppppp)
The format of the statement is shown in Figure 11-6. You may specify either the
PCB label, name, or number. The capability to specify the PCB label or name
was added by APARs PQ65486 for IMS Version 7 and PQ65489 for IMS Version
The HALDB control statement may be used with PHDAM, PHIDAM, and
PSINDEX databases. It restricts the PCB to the partition of the database or
secondary index specified on the PCB statement in the PSB. If a PROCSEQ
parameter is specified on the PCB, the statement restricts the PCB to a partition
of the secondary index. Otherwise, it restricts the PCB to a partition of the
database specified on the DBD parameter.
194 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
11.3.3 Secondary index and logical relationship considerations
You should be careful when using the HALDB control statement with secondary
indexes and logical relationships. The control statement specifies a partition of
the database or secondary index that is used to enter the database. When you
specify the PROCSEQ parameter on the PCB, you must specify a partition of the
secondary index. When you do not specify PROCSEQ, you must specify a
partition of the indexed database.
Figure 11-7 shows the use of the control statement with PROCSEQ on the PCB.
The control statement restricts the PCB to one partition of the database specified
in the control statement. It does not restrict the use of partitions in the indexed
database. In Figure 11-7 the statement restricts the third PCB to partition AAA in
the secondary index. It does not restrict the partitions accessed in the indexed
database. Partition AAA has index entries pointing to each of the partitions in the
indexed database.
Figure 11-7 Using a HALDB control statement with PROCSEQ on the PCB
Figure 11-8 on page 196 shows the use of the control statement without a
PROCSEQ on the PCB. The control statement restricts the PCB to one partition
of the indexed database. It does not restrict the use of partitions in the secondary
Figure 11-8 Using a HALDB control statement without PROCSEQ on the PCB
Figure 11-9 on page 197 shows the use of the control statement with logical
relationships. The control statement restricts the PCB to one partition of the
physical database containing the root segment in logical database LDBABC. This
physical database is DB0L1. It does not restrict the use of partitions in the
physical database DB0L2. Partition XAA in database DB0L1 has logical
relationships with records in all of the partitions of database DB0L2.
196 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Control Statement PSB
Physical Databases HALDB PCB(1,XAA) PCB DBD=LDBABC,...
DBOL1 PCB ...
DBOL2
PCB ...
D
A
LP
C
B
LC
E Database: DB0L1
Partition XAA Partition XBB Partition XCC
B C D
There are two reasons for the unavailable data condition. One is an unavailable
partition. The other is a lock reject. A lock reject can occur when a database
record is not available due the failure of a data-sharing subsystem holding a lock
on the record. It can also occur due to the failure of a CICS® system or ODBA
thread with an in-doubt unit of work holding a lock on the database record. ODBA
threads include DB2-stored procedures. If your program receives a BA status
code, it could be due to either an unavailable partition or a lock reject. It does not
receive information indicating which is the cause.
198 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
11.5.1 Secondary indexes with /SX fields
The /SX field is four bytes for non-HALDB databases but eight bytes with
HALDB. This increases the size of the secondary index's key field and changes
the offset to any following fields. The three changes that may be required are:
The KEYLEN parameter on the PCB statement for the secondary index in the
PSB by must be at least the size of the VSAM key of the secondary index. It
should be increased by four bytes.
The I/O area used by the secondary index segment must be increased by
four bytes.
The offset to any duplicate data fields or user fields that the application
program processes must be adjusted by four bytes.
Figure 11-10 shows the change to the program I/O area when a secondary index
with a /SX field is migrated to HALDB.
Figure 11-10 Program I/O area for secondary index with /SX field
These conditions are illustrated by Example 11-2, which shows the PSB;
Example 11-3, which shows the secondary index DBD; Example 11-4 on
page 201, which shows the indexed database DBD; and Figure 11-11 on
page 201, which shows the secondary index segment.
Example 11-3 DBD for secondary index with /SX and duplicate data fields
DBD NAME=PEOSKSI,ACCESS=INDEX
DATASET DD1=PESKSI,DEVICE=3390,SIZE=8192
SEGM NAME=SKILLCD,BYTES=31,PARENT=0
FIELD NAME=(SKTYPE,SEQ,U),BYTES=25,START=1,TYPE=C
LCHILD NAME=(SKILL,PEOPLE),INDEX=SKILIDX
DBDGEN
FINISH
END
200 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Example 11-4 DBD for indexed database with /SX and duplicate data fields
DBD NAME=PEOPLE,ACCESS=(HDAM,OSAM), X
RMNAME=(DFSHDC40,1,500,824)
DATASET DD1=SKILHDAM,BLOCK=1648,SCAN=0
SEGM NAME=NAMEMAST,BYTES=150,PTR=TWIN
FIELD NAME=(EMPLOYEE,SEQ,U),BYTES=60,START=1,TYPE=C
SEGM NAME=SKILL,PARENT=NAMEMAST,BYTES=80,PTR=TWIN
FIELD NAME=(SKILLTYP,SEQ,U),BYTES=21,START=1,TYPE=C
FIELD NAME=RATING,BYTES=6,START=22,TYPE=C
FIELD NAME=/SXA
LCHILD NAME=(SKILLCD,PEOSKSI),PTR=INDX
XDFLD NAME=SKILIDX,SRCH=SKILLTYP,SUBSEQ=/SXA,DDATA=RATING
DBDGEN
FINISH
END
0 21 25
Figure 11-11 Secondary index segment with /SX and duplicate data fields
Example 11-6 DBD for HALDB secondary index with /SX and duplicate data field
DBD NAME=PEOSKSI,ACCESS=PSINDEX
SEGM NAME=SKILLCD,BYTES=35,PARENT=0
Example 11-7 DBD for indexed HALDB database with /SX and duplicate data fields
DBD NAME=PEOPLE,ACCESS=(PHDAM,OSAM), X
RMNAME=(DFSHDC40,1,100,824)
SEGM NAME=NAMEMAST,BYTES=150,PTR=TWIN
FIELD NAME=(EMPLOYEE,SEQ,U),BYTES=60,START=1,TYPE=C
SEGM NAME=SKILL,PARENT=NAMEMAST,BYTES=80,PTR=TWIN
FIELD NAME=(SKILLTYP,SEQ,U),BYTES=21,START=1,TYPE=C
FIELD NAME=RATING,BYTES=6,START=22,TYPE=C
FIELD NAME=/SXA
LCHILD NAME=(SKILLCD,PEOSKSI),PTR=INDX
XDFLD NAME=SKILIDX,SRCH=SKILLTYP,SUBSEQ=/SXA,DDATA=RATING
DBDGEN
FINISH
END
0 21 29
Figure 11-12 HALDB Secondary index segment with /SX and duplicate data fields
HALDB does not use symbolic pointers. All HALDB secondary indexes use the
extended pointer set. Symbolic pointing for non-HALDB secondary indexes
places the concatenated key of the target segment in the data area of the
secondary index segment. Figure 11-13 on page 203 illustrates its place.
202 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Program I/O Area for Non-HALDB Sec. Index Segment using Symbolic Pointing
When you convert the secondary index to HALDB, you can place the
concatenated key field in the segment at the same place by including it as a
duplicate data field. If it is the only or last duplicate data field, it will occupy the
same place in the data portion of the segment.
Figure 11-8, Figure 11-9, and Figure 11-10 on page 204 show the PSB and
DBDs for a non-HALDB database and its secondary index, which uses symbolic
pointing.
Example 11-8 PSB using secondary index with symbolic pointing as a database
PCB TYPE=DB,DBDNAME=CONTRSI,PROCOPT=G,KEYLEN=8
SENSEG NAME=CONTR,PARENT=0
PSBGEN LANG=COBOL,PSBNAME=CONQRY
END
Example 11-11 and Example 11-12 show the DBDs for the secondary index and
the indexed database after they have been converted to HALDB. The secondary
index includes a concatenated key field as duplicate data. The PSB is not
changed when making this conversion to HALDB.
Example 11-11 DBD for PSINDEX with concatenated key as duplicate data field
DBD NAME=CONTRSI,ACCESS=PSINDEX
SEGM NAME=CONTR,BYTES=26,PARENT=0
FIELD NAME=(CONTRNUM,SEQ,U),BYTES=8,START=1,TYPE=C
LCHILD NAME=(CONTRACT,ENGAGEM),INDEX=CONTRIDX,RKSIZE=10
DBDGEN
FINISH
END
Example 11-12 DBD for indexed database with concat. key field as duplicate data
DBD NAME=ENGAGEM,ACCESS=PHDAM,RMNAME=(DFSHDC40,1,500,824)
SEGM NAME=CLIENT,BYTES=100,PTR=TWIN
FIELD NAME=(CLNUM,SEQ,U),BYTES=10,START=1,TYPE=C
SEGM NAME=CONTRACT,PARENT=CLIENT,BYTES=60,PTR=TWIN
FIELD NAME=(CONTRNO,SEQ,U),BYTES=8,START=1,TYPE=C
FIELD NAME=/CK1,BYTES=18,START=1
204 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
LCHILD NAME=(CONTR,CONTRSI),PTR=INDX
XDFLD NAME=CONTRIDX,SRCH=CONTRNO,DDATA=/CK1
DBDGEN
FINISH
END
Update Update
Read Read
DB X DB X
Version A Version B
DB Y DB Z
Figure 11-15 shows a corresponding HALDB test environment. Batch jobs A and
B each have their own copies of all databases and their own set of RECONs. All
of the databases are registered in the corresponding RECONs. The registration
requirement with HALDB may require you to make similar changes.
Update Update
DB X Read Read DB X
Version A RECONA RECONB Version B
DB Y DB Z DB Y DB Z
Copy A Copy A Copy B Copy B
206 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
BMP or JBP region, to a single partition; processing partitions in parallel; and
making some partitions unavailable to a subsystem. Most processing will not be
affected by these incompatibilities. This allows you to use non-HALDB versions
of the databases for testing. Of course, you would want to do system and
regression testing with HALDB databases before using them in production.
Alternatively, you may use the FABHEXTR exit in the IMS High Performance
Unload tool (program number 5655-E06) to extract a subset of the database
records in a database. This tool includes a PARTEXTR control statement, which
causes the extract to unload a subset of records from each partition of a HALDB
database. This would typically provide a more representative subset of the entire
database. The output of IMS High Performance Unload may be used as input to
the HD Reload utility, which creates the test database.
208 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
copies” on page 207, the partition ID is unlikely to allow you to use this method
with HALDB databases. We explain IBM plans to eliminate this restriction in
11.7.7, “Planned enhancement for copying partition definitions” on page 209. In
the meantime, you must use another method for creating your timestamp copy.
Part 4 Administration
In this part we discuss the administration of the HALDB. First we describe the
IMS commands that can be used with HALDB, and then we have a chapter for
the back up and recovery of HALDB. Different options of reorganization and the
self-healing pointers process are discussed also in this part of the book, as well
as considerations for when you need to change your existing HALDB databases.
We also provide a description and examples of how you can utilize the IMS Data
Management Tools for IMS administering the HALDB databases.
In the command you may specify either a HALDB master database name or a
partition name.
IMS keeps track of partition statuses and database statuses separately. For
example, a partition may be stopped but its master database may be started.
Alternatively, the partition may be started but its master database may be
stopped. Before opening, authorizing, or scheduling a partition, IMS always
examines the status of the partition and the database. If either one has a status
that would prevent the action, IMS does not take the action.
Each partition has the access limitations of both itself and its master database.
For example, if the master database has an access intent of read (RD) and one
of its partitions has an access intent of update (UP), the partition cannot be
updated. Alternatively, if the master database has an access intent of update
(UP) and one of its partitions has an access intent of read (RD), the partition
cannot be updated. Similar considerations apply to other statuses that affect
access limitations, such as being stopped, locked, or DBRed.
Commands issued with a partition name act only on the partition and its
statuses. Commands issued against the master database act only on the master
database and its statuses. This means that a start of a master database does not
start any of its partitions. If they are stopped, they remain stopped.
214 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
In the TYPE column the master database is shown as PHDAM, PHIDAM, or
PSINDEX. Partitions are shown as PART. Non-HALDB full-function databases
are shown as DL/I.
Example 12-1 shows the output of a /DISPLAY command for a master database.
If a /DBR command has been issued for the master database, a /DISPLAY
command of the master database does not show the partitions. Figure 12-2
shows the output of the /DIS command in this situation. We explain more about
the effects of /DBR commands in 12.3, “/DBRECOVERY command” on
page 217.
Example 12-2 /DIS DB command for master database after /DBR command
/DIS DB CUSTDB
Example 12-4 shows an example of the use of the /DIS DB command to display
multiple partitions. For each partition, the master database and the partition are
displayed.
Example 12-5 /DIS DB command for a partition after /DBR command for master
/DIS DB CUSTDB1
216 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
12.3 /DBRECOVERY command
The /DBR DB command may be used to deallocate and stop a HALDB database
or partition.
The /DBR DB command for a master database is used in the way that a /DBR DB
command is used for non-HALDB databases. It applies to the entire database.
Example 12-6 shows an example of the use of the /DBR command for a master
database.
If you issue a /DBR command for the HALDB master database, the HALDB
partitions are not shown when a display command for the master database is
issued. A display command for the master database only shows the master
database with its STOPPED status.
The /DBR DB command for a partition should only be used if you wish to DBR a
subset of the partitions in a HALDB database. If you wish to DBR the entire
database, issue the command for the master database, not for the partitions.
Example 12-7 shows an example of the use of the /DBR DB command for a
partition.
Example 12-8 shows a /DIS DB command for the master database after the
/DBR command for a partition.
If you issue a /DBR DB command for a partition, you must explicitly issue a /STA
DB command for the partition before it may be accessed. A /STA DB command
for the master database will not allow you to access the partition. When you issue
the /DBR DB command for the partition, flags are set in the partition’s control
block indicating its status. These flags are not affected by a /STA DB command
for the master database.
The /DBD DB command for a master database is used in the way that a /DBD DB
command is used for non-HALDB databases. It applies to the entire database.
218 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
12.4.2 DBD of a HALDB partition
The /DBD DB command for a partition closes and reopens all data sets in the
partition and reauthorizes the partition. It also sets flags in the control block for
the partition. It does not set flags in the control block for the master database.
The /DBD DB command for a partition should only be used if you wish to DBD a
subset of the partitions in a HALDB database. If you wish to DBD the entire
database, issue the command for the master database, not for the partition.
The /STOP DB command for a partition should only be used if you wish to stop a
partition or a subset of the partitions in a HALDB database. If you wish to stop
the entire database, issue the command for the master database, not for the
partition.
220 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
12.7.2 Lock of a HALDB partition
The /LOCK DB command for a HALDB partition sets a flag in the control block for
the partition. It does not set the flag in the control blocks for the master database.
The flag for the partition is turned off by an /UNLOCK DB command for the
partition.
If you DBR, DBD, or STOP a partition, the /START DB ALL command will not
reset the condition. You must specify the partition explicitly in the /START DB
command.
When no currently scheduled BMP or JBP has accessed the partition, but a
currently scheduled MPP, JMP, IFP, DBCTL thread, or ODBA thread has
accessed the partition, the command waits for the program to terminate.
Example 12-9 shows the results of a /STOP command for a master database.
The partition attributes that are shown in the CONDITIONS column are not
changed by the /STOP command for the master database. The partitions cannot
be accessed because the master database, CUSTSI, is stopped.
/STOP DB CUSTSI
222 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
/DIS DB CUSTSI
Example 12-10 shows the results of a /DBR command for a partition followed by
a /START command for its master database. The partition remains unavailable
after the /START command because it does not reset the flags for the partition.
/DISPLAY commands are included to show the results of the /DBR and /START
commands.
Example 12-10 /DBR for a partition and /START for its master database
/DIS DB CUSTDB
/DBR DB CUSTDB1
/DIS DB CUSTDB
/STA DB CUSTDB
/DIS DB CUSTDB
Example 12-11 shows the results of a /STOP command for a partition followed by
a /START DB ALL command. After the /STOP command, the /DISPLAY
command response shows that the master database conditions have not
changed. After the /START command, the partition remains unavailable because
the ALL keyword does not cause the command to act on partitions. It only acts on
the master database. /DISPLAY commands are included to show the results of
the /STOP and /START commands.
/STOP DB CUSTDB2
/DIS DB CUSTDB
224 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
CUSTDB4 PART UP NOTOPEN, ALLOCS
*2003091/170838*
/START DB ALL
/DIS DB CUSTDB
Tip: If you have explicitly stopped, deallocated, locked, or reset the access
intent for a partition, you cannot reset the condition with a command for its
master database or by using the ALL keyword. You must issue the /START or
/UNLOCK command using the partition name.
Most data sets are backed up with image copies and recovered with the
Database Recovery utility (DFSURDB0). These are the same processes that are
used for non-HALDB databases. These processes are used for PHDAM and
PHIDAM data data sets and PSINDEX data sets. These data sets have A–J
suffixes for their DD names.
PHIDAM primary index data sets and ILDSs do not use these processes. They
are not backed up with image copies. Database change log records are not
written for them. The Index/ILDS Rebuild utility (DFSPREC0) is used to rebuild
these data sets.
All of these utilities may be used for HALDB data sets. As with all HALDB
processing, DBRC is required.
Both fuzzy and clean image copies may be made for HALDB database data sets.
The IMS Image Copy Extensions is an alternative to the use of the Image Copy
utilities provided by IMS. It has full support for HALDB. This tool is explained in
16.4, “IMS Image Copy Extensions” on page 276.
You can also use various utilities supplied by the operating system to make your
backup copies. These are called non-standard or user image copies. As with
non-HALDB databases, these copies do not interact with DBRC. You must notify
DBRC of these user image copies. Use the NOTIFY.UIC command to do this.
228 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
13.2.1 Database Image Copy utility (DFSUDMP0) example
Example 13-1 shows the Database Image Copy utility (DFSUDMP0) JCL for data
sets in database NORDDB. This database has one data set group and four
partitions, so each partition has one data set to copy. The job creates one image
copy data set for each partition. The control statements specify the master
database name and the DD name for each data set. Partition names are not
used on control statements. Dynamic allocation is used for the database data
sets.
Example 13-2 on page 230 shows the Database Image Copy 2 utility JCL to copy
four database data sets to one output data set. This capability was added to
Database Image Copy 2 in IMS Version 8. The control statements specify the
230 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
(DFSUCUM0) and the Database Recovery utility (DFSURDB0). Alternatively,
tools such as the IMS Online Recovery Service (ORS) may be used.
To recover a HALDB data set, specify the master database name in the PARM
field of the EXEC statement of the Database Recovery utility, and specify the
master database name and the DD name on the control statement.
Since all PHDAM and PHIDAM VSAM data data sets and all PSINDEX data sets
must be defined with the REUSE attribute, they may be reused. They do not have
to be deleted and redefined before they are recovered.
The IMS Online Recovery Service (ORS) tool (product number 5655-E50) may
be used to recover IMS database data sets. Like the Database Recovery utility, it
may be used to recover HALDB database data sets that have A–J suffixes.
These data sets are PHDAM and PHIDAM data data sets and PSINDEX data
Timestamp recoveries
Timestamp recoveries restore database data sets to their state at a previous
time. They are typically done to recover from an application or operational error
that incorrectly updated a database.
When a timestamp recovery is done, typically all data sets in the database are
recovered to the same time. This avoids potential data integrity problems.
Logically related databases and secondary indexes for the database are also
recovered to the same time. If there are databases that are related by application
logic, they are also recovered to this time. These considerations apply to HALDB
databases. All partitions and all related databases should be recovered to the
same time to avoid potential data integrity problems.
232 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
GENJCL.RECOV examples
Example 13-3 shows the GENJCL.RECOV step used to generate the recovery
JCL for all partitions of the NORDDB database.
Example 13-4 shows the GENJCL.RECOV step used to generate the recovery
JCL for only partition NORDDB1.
234 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
// DSN=IMS810C.PROCLIB(DFSVSMDB)
//SYSIN DD *
S NORDDB NORDDB3A
/*
//RCV4 EXEC PGM=DFSRRC00,
// PARM='UDR,DFSURDB0,NORDDB,,,,,,,,,,,Y,,,,,,,,'
//STEPLIB DD DISP=SHR,DSN=IMS810C.SDFSRESL
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//IMS DD DISP=SHR,DSN=IMS810C.DBDLIB
//NORDDB4A DD DSN=IMSPSA.IM0A.NORDDB.A00004,
// DISP=OLD,
// DCB=BUFNO=10
//DFSUDUMP DD DSN=IMSPSA.IMCOPY.NORDDB4,
// DISP=OLD,DCB=BUFNO=10
//DFSVDUMP DD DUMMY
//DFSUCUM DD DUMMY
//DFSULOG DD DUMMY
//DFSVSAMP DD DISP=SHR,
// DSN=IMS810C.PROCLIB(DFSVSMDB)
//SYSIN DD *
S NORDDB NORDDB4A
/*
Example 13-6 shows the JCL that was generated by the GENJCL.RECOV
command in Example 13-4 on page 233. The GENJCL.RECOV command
specified a partition name. The database has only one data set group, so only
one data set is recovered for the partition.
The Index/ILDS Rebuild utility scans the HALDB partition and recreates the
PHIDAM primary index, the ILDS, or both. A single execution of the utility will
recover only one partition.
The master database name is specified in the PARM field of the EXEC
statement. The SYSIN statement specifies the partition name and the recovery
type. RECOVTYP can be either INDEX, ILE, or BOTH.
INDEX rebuilds only the PHIDAM index data set. ILE rebuilds only the ILDS.
BOTH rebuilds the PHIDAM index data set and the ILDS. When BOTH is used,
the utility rebuilds the index and then rebuilds the ILDS. The ILDS cannot be
rebuilt if the index does not exist.
The DFSVSAMP data set provides buffer pool definitions for the data sets being
read and written in the process.
Example 13-7 shows the JCL to rebuild the ILDS and the PHIDAM index data set
for partition NORDDB1 in database NORDDB.
Example 13-7 JCL for rebuilding ILDS and index data set
//RCV1 EXEC PGM=DFSRRC00,
// PARM='ULU,DFSPREC0,NORDDB,,,,,,,,,,,Y,N'
//*
//STEPLIB DD DISP=SHR,DSN=IMSPSA.IMS0.SDFSRESL
// DD DISP=SHR,DSN=IMSPSA.IM0A.MDALIB
//IMS DD DISP=SHR,DSN=JOUKO4.DBDLIB
//SYSPRINT DD SYSOUT=*
//DFSVSAMP DD DSN=IMSPSA.IM0A.PROCLIB(DFSVSM0S),DISP=SHR
//SYSIN DD *
PARTITION=NORDDB1,RECOVTYP=BOTH
236 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
/*
The PHIDAM index data set or ILDS must be deleted and redefined before it is
rebuilt. The VSAM REUSE attribute cannot be used for these data sets.
When rebuilding the PHIDAM index, the utility reads all of the root segments in
the partition. It only needs to read the first data data set. This is the one with the
A prefix.
If the roots have twin pointers, the utility reads blocks until it finds a root segment.
When it finds the a root segment, it follows the twin backward pointers until it
finds the first root in the partition. It then follows twin forward pointers to find all of
the roots and rebuild their index entries.
If the roots do not have twin pointers, the utility reads all of the blocks in the data
set. It builds index entries for each root that it finds.
When rebuilding the ILDS, the utility does unqualified GN calls for all segments
that are targets of Extended Pointer Sets (EPSs). These are secondary index
targets, logical parents for unidirectional logical relationships, and paired logical
children for bidirectional logical relationships.
The utility uses database buffer pools. You must supply a DFSVSAMP statement
with buffer pools defined for the data sets being read and written. As with other
IMS database processing, performance is often optimized with a large number of
buffers.
If the database uses OSAM, you should use OSAM sequential buffering. The
read process is almost always a sequential process. In fact, when recovering the
PHIDAM index without twin pointers for the roots, the read is strictly sequential.
OSAM sequential buffering will eliminate waits for reads.
Example 13-8 shows the syntax of the GENJCL.USER command with member
DSPUPJCL. User key %MDBNAME specifies the master database name. User
key %DBNAME specifies the partition name. User key %RECTYP specifies the
type of recovery. It may have values of INDEX, ILE, or BOTH.
Example 13-9 shows the GENJCL.USER job used to generate the rebuild JCL
for both the ILDS and the PHIDAM index data set of partition NORDB1 in
database NORDDB.
Example 13-10 shows the JCL generated by the job in Example 13-9.
238 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
// PARM='ULU,DFSPREC0,NORDDB,,,,,,,,,,,Y,N'
//SYSPRINT DD SYSOUT=A
//IMS DD DSN=JOUKO4.DBDLIB,DISP=SHR
//DFSVSAMP DD DSN=IMS.VSAM.PARM(OPTIONS),DISP=SHR
//SYSIN DD *
PARTITION=NORDDB1,RECOVTYP=BOTH
/*
Example 13-12 shows the JCL generated by the job in Example 13-11. The
secondary index has three partitions. Each is recovered.
240 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
/*
For logical relationships, the output of the Prefix Resolution utility is processed by
the Prefix Update utility. Prefix Update updates the logical pointers.
SI-3
SI-2
DB-B
DB-A DB-A
SI-1
Database Scan Prefix Resolution
HD Unload HD Reload Prefix Resolution HISAM Unload
Prefix Update HISAM Reload
or
Index Builder
244 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
14.1.2 HALDB reorganization overview
A reorganization of a HALDB database may be done with one or more parallel
processes. These processes unload one or more partitions and reload them. If
the database has secondary indexes or logical relationships, additional steps are
not required. The HALDB self-healing process makes updates of pointers during
the reorganization unnecessary. The amount of time required for a reorganization
depends on the sizes of the partitions. Smaller partitions reduce the time. You
may reduce your reorganization time by creating more partitions and
reorganizing them in parallel.
Figure 14-2 shows the processes used to reorganize a HALDB database with
logical relationships and secondary indexes. In this case, the partitions are
reorganized by parallel processes. Each partition can be unloaded and reloaded
in less time than unloading and reloading the entire database. This is much faster
than the process for a non-HALDB database. Additionally, no time is required for
updating pointers in the logically related database or rebuilding secondary
indexes. This further shortens the process.
DB-A
Related databases not processed by
Unload
Unload
DB Reload
ReloadDB the reorganization
Part1 Part2
Part1
Secondary Indexes
Part2 Part2
Part 2 Part 2 Part 2
Part3 Part3
Logically Related Database
246 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Do not include DD statements for the HALDB database data sets. HD Unload
uses dynamic allocation for HALDB data sets. This is not true for non-HALDB
databases.
You should enable OSAM sequential buffering for databases using OSAM.
You must supply buffer pools for all data sets in the partitions that are unloaded.
This includes the ILDSs.
The High Performance Unload tool is an alternative to the use of HD Unload. You
may use HP Unload to unload any number of partitions or the entire database.
If you delete and redefine VSAM data sets, you will receive an IEC161I 152-061
message when reloading a partition. This is not an error message. It indicates
that a VSAM data set was empty when it was opened. Example 14-4 shows the
message for an ILDS.
Step 5 initializes all partitions for which the PINIT flag is set. Step 5 from the two
jobs may execute at approximately the same time. Step 5 of job A may attempt to
initialize both partitions. First, it gets DBRC authorization for partition A. Before it
completes, step 5 of job B executes. The PINIT flag is still on for both partitions.
Step 5 of job B attempts to initialize both partitions. It requests DBRC
authorization for partition A. This fails. Job B abends due to the authorization
failure. It does not reload partition B. The solution is not to set the PINIT flag. Do
not include steps 4 and 5. This technique assumes that there is data in both
partitions. If a partition does not have data and you delete and redefine its data
sets, the partition must be initialized. Empty partitions should be rare. HD Unload
will complete with RC=4 if it unloads an empty partition. You may use this to alert
yourself to this condition.
248 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
14.1.6 Reloading HALDB partitions and databases
HALDB partitions and databases may be reloaded with HD Reload
(DFSURGL0). HD Reload reads the output file from HD Unload. You do not
specify the partitions to be reloaded. They are determined by the records in the
input file to HD Reload.
Do not include DD statements for the HALDB database data sets. HD Reload
uses dynamic allocation for HALDB data sets. This is not true for non-HALDB
databases.
You must supply buffer pools for all data sets in the partitions that are reloaded.
This includes the ILDSs.
HD Reload sets the image copy needed flag for data sets in partitions that it
loads. You should image copy them as you would any database data sets after
they have been reloaded.
Example 14-5 shows a sample job that reloads HALDB partitions. The partitions
it reloads depend on the records in the input file.
No control statement
When you do not specify a control statement in the SYSIN data for HD Reload,
an ILDS entry is updated or created when a target of a secondary index or logical
relationship is inserted in the partition. An entry exists if a previous
reorganization loaded the target segment in the partition. The updates to the
ILDS are done in VSAM update mode. When a CI or CA is filled, it must be split
by VSAM. Free space in the ILDS may help avoid these splits. Updates may be
random or sequential. This depends on the order in which these segments are
inserted and their ILKs. The ILDS keys are based on the ILK that is based on the
location of the target segment when it was created.
You may create free space in an ILDS by copying it using REPRO. REPRO
honors the free space parameters in the VSAM DEFINE.
You may delete and redefine the ILDS before reloading. You may want to do this
to eliminate entries in the ILDS for target segments that are no longer in the
partition. HD Reload never deletes an entry. The only way to delete these entries
is to delete and redefine the ILDS. On the other hand, an empty ILDS will contain
no free space. A reload with a large number of target segments may require a
large number of CI and CA splits.
250 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
to migration reloads. We explain its use in 8.4.2, “HD Reload with an ILDSMULTI
control statement” on page 100.
Partition DBDS
EPS
Partition ID Current reorg # :5
Reorg # : 5
RBA
ILK
ILK
... Target segment
Each secondary index entry and each logical child segment contains the key of
its target record. For secondary indexes the key of the target’s root segment is
included in the prefix. For logical child segments, the concatenated key of the
logical parent is included in the segment data.
Each segment in a PHDAM or PHIDAM database has an Indirect List Key (ILK).
The ILK is unique for the segment type across the entire database. It is
composed of the RBA, partition ID, and partition reorganization number of the
segment when it was first created. The ILK for a segment never changes. It is
maintained across reorganizations.
Each secondary index entry or logical child segment has an extended pointer set
(EPS). The extended pointer set includes the ILK of its target segment. It also
contains the RBA, partition ID, and partition reorganization number for the target
segment. These parts of the EPS may not be accurate. That is, they may not
reflect the current location of the target segment or the current reorganization
number of the target segment’s partition. In Figure 14-3 they are accurate.
The target segment has an Indirect List Entry (ILE) in the Indirect List Data Set
(ILDS) for a partition. The ILE contains accurate information about the target
segment. This includes its current RBA, the correct partition ID, and the current
reorganization number for the partition. The key of the ILE is composed of the
ILK and the segment code of the target segment.
The reorganization number for a partition is physically stored in the partition’s first
database data set. This number is initialized by partition initialization or load, and
incremented with each reorganization that reloads segments in the partition.
252 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
14.2.2 Finding target segments
When IMS accesses the target segment from the secondary index entry or
logical child segment, it must first determine the partition in which the target
resides. It uses the key in the secondary index or logical child to determine the
partition. Next it must determine the location in the target partition database data
set. It compares the partition ID and reorganization number of the target partition
with the partition ID and reorganization number stored in the EPS. If they match,
IMS uses the RBA in the EPS to locate the target segment. If they do not match,
the RBA in the EPS cannot be used.
When the RBA in the EPS cannot be used, IMS uses the information in the ILE to
locate the target segment. The ILE key is found by using the ILK from the EPS
and the target’s segment code. The ILE is read from the ILDS of the partition
determined from the target’s key.
Figure 14-4 illustrates a situation where the RBA in the EPS cannot be used. In
the figure, the target partition has been reorganized three times since the EPS
was accurate. This has moved the target segment and updated the
reorganization number in the partition data set. The EPS still contains a
reorganization number of 5, but the reorganization number in the partition data
set is now 8. The information in the ILE has been updated by HD Reload. IMS
uses the ILK from the EPS to find the ILE and uses the RBA in the ILE to find the
target segment.
ILDS ILE
Secondary Index or
ILK
Logically related database ILE Segment Code
Partition ID
Current reorg # : 8
Secondary index entry
KSDS Current RBA
or logical child segment
...
EPS KEY
Partition DBDS
EPS
Partition ID Current reorg # :8
Reorg # : 5
ILK
RBA
ILK Target segment
...
We will see that even though the retrieval is indirect, often the CI containing the
ILE will already be in IMS’s buffer pool. Nevertheless, it would be good to avoid
Figure 14-5 shows the EPS after it has been healed. The RBA points to the
current location. The partition ID is correct. The partition reorganization number
matches the number stored in the partition database data set.
ILDS ILE
Secondary Index or
ILK
Logically related database ILE Segment Code
Partition ID
Secondary index entry
Current reorg # : 8
KSDS Current RBA
or logical child segment
...
EPS KEY
Partition DBDS
EPS
Partition ID Current reorg # :8
Reorg # : 6
ILK
RBA
ILK Target segment
...
254 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Performance of the self-healing process
The performance of the self-healing process may be much more efficient than
you would anticipate.
Many pointers may be healed with a small number of ILDS reads. This is due to
the use of IMS database buffering. ILDSs are database data sets. They use
database buffer pools in the same way that other database data sets use them. If
a CI is already in its buffer pool, it does not have to be read from DASD. Each ILE
is 50 bytes. You specify the CI sizes for your ILDSs. An 8 K ILDS CI holds up to
163 ILEs. A 16 K CI holds up to 327 ILEs. So a single CI may hold many ILEs.
After a reorganization IMS may need to heal many pointers to the reorganized
partitions. When there are frequent uses of the CIs in an ILDS, they tend to
remain in their buffer pool. One read of an ILDS CI may be sufficient to heal
hundreds of pointers. As with most IMS database tuning, having a large number
of buffers for frequently used data sets may be highly beneficial.
See 2.1.7, “Buffer pools” on page 25, for an explanation of how to assign HALDB
data sets, including ILDSs, to buffer pools.
Another benefit of the self-healing process is that it does not waste resources
healing pointers that are not used. In many secondary indexes, only a small
number of entries are actually used. With a non-HALDB database, the entire
index is rebuilt every time the indexed database is reorganized. With HALDB, the
index is not rebuilt and only a small number of referenced index entries are
updated. HALDB does not use resources to update pointers that are never used.
We believe this problem is rare. We expect that most users will be able to let the
pointer healing process occur without taking any special precautions.
Tip: Do not rebuild your secondary indexes after a reorganization. Let the
self-healing process of HALDB correct the pointers. This will shorten the
outage for reorganizations and will tend to minimize the use of resources.
256 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
15
These changes are made by updating the DBD while the database is not in use.
258 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
change is committed. DBD changes affect every partition, so the master
database name should be used for these commands. For more information on
using online commands with HALDB, see Chapter 12, “HALDB online
commands” on page 213.
If you do not have a tool to add a secondary index, you may use the following
steps:
1. Create an unload file for the indexed database. You may use HD Unload or an
application program that you write.
2. Add the secondary index definitions to the indexed database DBD.
3. Create the DBD for the secondary index.
4. Define the partitions for the secondary index.
5. Allocate the data sets for the secondary index.
6. Initialize the secondary index partitions.
7. Load the indexed database. You must provide the program to do this. It reads
the file created in step 1. When the indexed database is loaded, secondary
index entries are created. This is a random process so it may significantly
elongate the load time.
If you use HD Unload in step 1, the output file contains a header record, one
record for each segment, and a trailer record. The segment record includes the
segment name and the segment data. Your load program for step 7 may map the
records in this file by using the DSECT in the IMS DFSURGUP macro in
SDFSMAC.
These changes cannot be made while the partition is authorized, but other
partitions in the database may be authorized. All of these parameters, other than
the VSAM CI size, are kept in the RECONs. They are specified in the Partition
Definition utility or in DBRC CHANGE commands. If you change them, the
partition init needed (PINIT) flag is set for the partition.
You can make changes that affect multiple partitions. These include adding
partitions, deleting partitions, changing partition boundaries, and changing a
partition selection exit routine. These changes cannot be made while the affected
partitions are authorized, but other partitions in the database may be authorized.
Adding a partition
You may want to add a partition. This is typically done when a partition grows too
large. Adding a partition causes some of the records in an existing partition to be
moved to the new partition. Figure 15-1 on page 261 shows the addition of a
partition. In the figure partition D is added to the database. Its high key is 3M.
Previously defined partitions A, B, and C had high keys of 2M, 4M, and high
values. The addition of the new partition will require the movement of records
with keys above 2M and up to 3M from partition B to partition D. This means that
partition B is affected by the change. When partition D is defined with a high key
of 3M, IMS sets the PINIT flag for partitions B and D. Partition initialization will
260 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
initialize these two partitions. Partitions A and C are not affected by the change.
The steps in the process are:
1. Unload partition B.
2. Define the new partition with the Partition Definition utility or DBRC
commands and allocate the new partition’s data sets.
3. Initialize partitions B and D.
4. Reload using the output of step 1. This loads partitions B and D. The image
copy needed flag is set for the data sets in B and D.
A B C
2M 4M High Values
1. HD Unload
.
2. Add partition D
3. Initialize B and D
4. HD Reload
A D B C
2M 3M 4M High Values
Deleting a partition
You may want to delete a partition. This is typically done when a partition has
little data. Deleting a partition causes its records to be moved to another partition.
Figure 15-2 on page 262 shows the deletion of partition B. Its high key is 4M. The
deletion of partition B will require the movement of its records to partition C. This
A B C D
2M 4M 6M High Values
1. HD Unload
.
2. Delete partition B
3. Initialize C
4. HD Reload
A C D
2M 6M High Values
262 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
some records to be moved from one partition to another. Figure 15-3 on
page 263 shows the change of the high key for partition B. Its high key is
changed from 4M to 5M. The change will require the movement of records with
keys above 4M and up to 5M from partition C to partition B. This means partitions
B and C are affected. When the definition of partition B is changed, IMS sets the
PINIT flag for partitions B and C. Partition initialization will initialize these
partitions. Partitions A and D are not affected by the change. The steps in the
process are:
1. Unload partitions B and C.
2. Change the definition for partition B with the Partition Definition utility or
DBRC commands.
3. Initialize partitions B and C.
4. Reload using the output of step 1. This loads partitions B and C. The image
copy needed flag is set for the data sets in B and C.
A B C D
2M 4M 6M High Values
1. HD Unload
4. HD Reload
A B C D
2M 5M 6M High Values
A B C
2001zzz 2002zzz 2003zzz
1. Add partition D
2. Initialize D
A B C D
2001zzz 2002zzz 2003zzz 2004zzz
Figure 15-4 Adding a higher key partition with key range partitioning
264 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
A B C D
2001zzz 2002zzz 2003zzz 2004zzz
1. Delete partition A
B C D
2002zzz 2003zzz 2004zzz
Figure 15-5 Deleting the lowest key partition with key range partitioning
If there is a secondary index, you must be careful when deleting a partition. If the
secondary index has entries pointing to the deleted partition, the secondary
index becomes invalid. You must rebuild it with a tool such as the IMS Index
Builder. If the secondary index does not have entries pointing to the deleted
partition, it is not affected and does not have to be rebuilt. If there are no records
in the deleted partition, the secondary index does not have to be rebuilt. It is
unaffected by the partition deletion.
Adding a partition
You may want to add a partition. This is typically done when a partition grows too
large. Adding a partition causes some of the records in one or more existing
partitions to be moved to the new partition. This is similar to adding a partition to
a database that uses key range partitioning. We explained this in “Adding a
partition” on page 260. You must unload the partition or partitions from which
records will be moved. After the unload, define the new partition and make any
necessary changes to your exit routine. You may also need to change the
Deleting a partition
You may want to delete a partition. This is typically done when a partition has
little data. Deleting a partition causes its records to be moved to one or more
other partitions. This is similar to deleting a partition when using key range
partitioning. We explain this in “Deleting a partition” on page 261. You must
unload the partition to be deleted and any other affected partitions. These are the
partitions into which the records from the deleted partition will be moved. After
the unload, delete the definition for the partition to be deleted and make any
necessary changes to your exit routine. You may also need to change the
partition strings for some partitions. When you use a partition selection exit
routine, IMS cannot know which partitions are affected by the deletion of the
partition. IMS does not set the PINIT flag for existing partitions unless their
definitions, such as their partition strings, are changed. You must set the PINIT
flag for partitions when they are affected but you make no changes to their
definitions. Once you have set the PINIT flag in the appropriate partitions, you
initialize them. Then you run HD Reload. It loads data in partitions according to
the assignments made by your exit routine. The image copy needed flag is set for
the data sets in the partitions that are initialized or loaded by HD Reload.
266 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
exit routine, you run HD Reload. It loads data in partitions according to the
assignments made by changes. The image copy needed flag is set for the data
sets in the partitions that are initialized or loaded by HD Reload.
To change a partition name you must unload the partition, delete its definition,
redefine the partition with the new name, initialize the partition, and reload it. The
deletion of the existing definition also deletes image copy and ALLOC record
information about the partition from the RECONs.
The assignment of a new partition ID has important implications for deleting and
redefining a partition definition and the possibility of backing out our change. This
is illustrated by the example in Figure 15-6 on page 268. In this example, we
have a database with three partitions. This is shown in step 1. We decide to
delete partition C. In step 2 we unload partitions B and C, delete partition C,
initialize B, and run reload. This changes the database to two partitions. If we
change our minds and try to back out our changes, we have a potential problem.
In step 3 we redefine partition C. It has a new partition ID. Even though we may
have image copied our partition C data sets before deleting the partition in step
2, these image copies are useless. They contain partition ID 3. Our new definition
requires partition ID 4. There is an alternative. We could use our HD Unload to
reload partitions B and C after redefining C. A reload in step 3 would be
successful. Reload does not attempt to overwrite the new partition ID. After the
reload, the image copy needed flags would be set for the data sets in partitions B
and C.
IBM plans to provide another alternative for this situation. We describe this
enhancement to the export and import functions of the Partition Definition utility
in 11.7.7, “Planned enhancement for copying partition definitions” on page 209.
Using this capability you could export the partition definitions along with their
partition IDs before deleting partition C. If you decided to back out your change,
you could import the definitions in step 3. Since the definitions for partitions A
and B already exist, they would not be imported. Only the definition of partition C
would be imported. It would have a partition ID of 3. This would allow you to
restore the image copies of the partition C data sets that you made before
deleting the partition. Importing only partition C would require that your execution
of import specified “Try all partitions” for its processing option.
268 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
other means for this. You may use a tool such as the IMS Index Builder.
Alternatively, you may use a technique similar to one used to add a secondary
index. We describe this in 15.1.4, “Adding a secondary index” on page 259.
When you make changes to an indexed database that do not require changes to
secondary index definitions, you do not need to make any changes to the
secondary indexes. They do not need to be unloaded, reloaded, or rebuilt. The
self-healing pointer scheme of HALDB provides this capability. The reload
process for the indexed database updates the ILDSs. This is all that is required to
ensure that the secondary index pointers may be used to find the moved target
segments.
This chapter also provides some examples of how to use the tools with HALDB
databases.
The unload data set produced by these unload utilities can be used as input to
the IMS HD Reorganization Reload utility and to other reload utilities that are
compatible with it.
272 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Read of a corrupted database
High Performance Unload options give you greater control when you are
unloading a database that has an incorrect pointer.
– The SKERROR option can be used to bypass pointer errors.
– The BYINDEX option can be used to force the roots of the HIDAM or
PHIDAM database to be accessed from the primary index.
Example 16-1 shows the JCL to unload the entire customer (CUSTDB)
database. The unloaded data set is defined by the SYSUT2 DD statement.
For more information on IMS High Performance Unload, refer to the IMS High
Performance Unload for OS/390, V1R1, User’s Guide, SC27-0936.
For more information on IMS High Performance Load, refer to the IMS High
Performance Load for OS/390, V1R1, User’s Guide, SC27-0938.
274 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
16.3 IMS Index Builder
The IMS Index Builder provides the features to build or rebuild IMS secondary
indexes, and to rebuild HIDAM and/or PHIDAM primary indexes. Support is
provided for both IMS non-HALDB and HALDB.
The IMS Index Builder helps to simplify index recovery and maintenance,
reduces index maintenance time, and eliminates the need to image copy index
databases. It gives an easy-to-use one-step procedure for maintaining primary
and secondary indexes.
In “BLDSNDX parameter” on page 187 we explain how you may use the IMS
Index Builder to build secondary indexes after an initial load of an indexed
database. This is an alternative to building the secondary index as part of the
initial load. This use of IMS Index Builder may supply substantial performance
benefits.
In 13.5.1, “Using IMS Index Builder for recoveries” on page 241, we explain how
IMS Index Builder may be used for recoveries of secondary indexes.
We explain how to use IMS Index Builder to add a secondary index to an existing
HALDB database in 15.3, “Changing secondary indexes” on page 268.
For more information on the IMS Index Builder, refer to the IMS Index Builder for
Z/OS, V2R3 User’s Guide, SC27-0930.
276 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
ICE eliminates steps by automatically allocating input and output data sets.
Input and output data sets do not require DD statements. They will be
dynamically allocated.
The tests uses the CUSTOMER database (PHIDAM/OSAM) that was converted
from HIDAM to PHIDAM in 9.2, “Migration of a database with a secondary index”
on page 142.
Example 16-4 shows the JCL of Image copy extensions for HALDB. This JCL will
make an image copy of all HLADB partitions.
Example 16-5 shows the ICEIN DD statement with PART parameters. To take
advantage of one of the benefits of HALDB, the partitions can be image copied
concurrently by running an image copy for each partition explicitly in different
jobs, thus reducing the total elapsed time.
For more information on Image Copy Extensions, refer to the IMS Image Copy
Extensions for OS/390, V1R1, User’s Guide, SC27-0924.
278 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Part 5
Part 5 Appendixes
This part contains the following appendixes:
Appendix A, “Sample GENJCL.USER skeletons for HALDB allocation” on
page 281
Appendix B, “HALDB functions added by APARs” on page 291
Appendix C, “Summary of HALDB utilities” on page 293
This appendix is a slightly modified version of the technical document that can be
found on Web at the following address:
http://www.ibm.com/support/techdocs/atsmastr.nsf/WebIndex/TD100491
The following shows how these skeletal JCL members could be defined. You
should modify them to meet your installation's needs. For example, if
SMS-managed storage is used, the values for STORCLAS and MGMTCLAS
would have to meet your installation's standards. If you do not use
282 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
SMS-managed storage, you would replace STORCLAS and MGMTCLAS with
the appropriate VOLUMES parameter for your installation.
284 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Example: A-3 Sample DBDDDEFV member
%DELETE (%STPNO NE '00000')
//S%STPNO EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
%ENDDEL
%SELECT DBDS((%DBNAME,%DDNAME))
DEFINE CLUSTER (NAME(%DBDSN) -
STORCLAS(STANDARD) -
MGMTCLAS(STANDARD) -
CYLINDERS(%UPRIM %USEC) -
REUSE -
SHR(3 3) -
CISZ(%UCISZ) -
RECORDSIZE(%URECSZ %URECSZ) -
NONINDEXED SPEED ) -
DATA(NAME(%DBDSN.DATA))
%ENDSEL
Defaults member
You may use the following member to contain default values for user variables. In
the examples in this section, its member name is DBDDFLTD. The
GENJCL.USER commands specify this member in their DEFAULTS parameter.
Example A-6 on page 287 shows an example of a PHIDAM database with two
data set groups and a secondary index. The database name is RZLDBT. Its
partition names are DBTP01, DBTP02, DBTP03, DBTP04, and DBTP05. The
secondary index is RZLSIT1. Its partition names are SIT1P01, SIT1P02,
SIT1P03, and SIT1P04. The HALDB naming convention creates DD names from
these partition names. For example, the DD name of the ILDS data set for the
DBTP01 partition is DBTP01L. The DD name for the PHIDAM index of this
partition is DBTP01X. The DD names of the data data sets are DBTP01A and
DBTP01B. The following DBRC commands create the four DBDS groups for this
database and the DBDS group for the secondary index. The groups have been
named to indicate the database and the type of data sets in the group. For
example, DBDS group RZLDBTA contains the A data sets for the partitions in
database RZLDBT.
286 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Example: A-6 JCL for defining the DBDS groups
//DBDSGRP JOB (999,XXX),
// 'INIT DBDSGRPS',
// CLASS=A,MSGCLASS=T,MSGLEVEL=(1,1),
// NOTIFY=LEWIS,
// REGION=4M
//D EXEC PGM=DSPURX00
//STEPLIB DD DISP=SHR,DSN=IMS.SDFSRESL
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//IMS DD DISP=SHR,DSN=IMS.DBDLIB
//********************************************
//*
//SYSIN DD *
INIT.DBDSGRP GRPNAME(RZLDBTA) MEMBERS( -
(DBTP01 ,DBTP01A), -
(DBTP02 ,DBTP02A), -
(DBTP03 ,DBTP03A), -
(DBTP04 ,DBTP04A), -
(DBTP05 ,DBTP05A))
INIT.DBDSGRP GRPNAME(RZLDBTB) MEMBERS( -
(DBTP01 ,DBTP01B), -
(DBTP02 ,DBTP02B), -
(DBTP03 ,DBTP03B), -
(DBTP04 ,DBTP04B), -
(DBTP05 ,DBTP05B))
INIT.DBDSGRP GRPNAME(RZLDBTL) MEMBERS( -
(DBTP01 ,DBTP01L), -
(DBTP02 ,DBTP02L), -
(DBTP03 ,DBTP03L), -
(DBTP04 ,DBTP04L), -
(DBTP05 ,DBTP05L))
INIT.DBDSGRP GRPNAME(RZLDBTX) MEMBERS( -
(DBTP01 ,DBTP01X), -
(DBTP02 ,DBTP02X), -
(DBTP03 ,DBTP03X), -
(DBTP04 ,DBTP04X), -
(DBTP05 ,DBTP05X))
INIT.DBDSGRP GRPNAME(RZLSIT1A) MEMBERS( -
(SIT1P01 ,SIT1P01A), -
(SIT1P02 ,SIT1P02A), -
(SIT1P03 ,SIT1P03A), -
(SIT1P04 ,SIT1P04A))
Each GENJCL.USER command opens, writes, and closes the output data set.
For this reason, each command uses a different member of data set
IMS.JCLOUT. If multiple commands wrote to the same member, later commands
would overwrite the output of earlier commands.
Example A-7 shows GENJCL.USER commands that use the DBDS groups and
skeletal JCL that were created in the first two steps. OSAM is used for the data
data sets. Skeletal JCL member DBDDDEFO is used for these data sets.
Skeletal JCL member DBDDDEFX is used for the PHIDAM index data sets and
the secondary index data sets. The keys of the PHIDAM index are 5 bytes long
at offset 5. The keys of the secondary index are 5 bytes long at offset 34. These
values are specified for the %UKSIZE and %UKOFFST user variables. The
PHIDAM index record size is 10 bytes. The secondary index record size is 40
bytes. These values are specified for the %URECSZ user variable. Similarly,
space and free space variables are also specified. Skeletal member DBDDDEFL
is used for the ILDSs.
288 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
USERKEYS((%UPRIM,'2'),(%USEC,'1')) -
DEFAULTS(DBDDFLTD) ONEJOB
GENJCL.USER GROUP(RZLDBTX) MEMBER(DBDDDEFX) JCLOUT(JCLOUTX) LIST -
USERKEYS((%UPRIM,'2'),(%USEC,'1'),(%UKSIZE,'5'), -
(%UKOFFST,'5'),(%UCISZ,'4096'),(%URECSZ,'10')) -
DEFAULTS(DBDDFLTD) ONEJOB
GENJCL.USER GROUP(RZLDBTL) MEMBER(DBDDDEFL) JCLOUT(JCLOUTL) LIST -
USERKEYS((%UPRIM,'1'),(%USEC,'1'))
DEFAULTS(DBDDFLTD) ONEJOB
GENJCL.USER GROUP(RZLSIT1A) MEMBER(DBDDDEFX) JCLOUT(JCLOUTS) LIST -
USERKEYS((%UPRIM,'1'),(%USEC,'1'),(%UKSIZE,'5'), -
(%UKOFFST,'34'),(%UCISZ,'4096'),(%URECSZ,'40')) -
DEFAULTS(DBDDFLTD) ONEJOB
292 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
C
DFSUPNT0 HALDB Partition Data Set Refer to 6.4, “Database Partition Data
Initialization Set Initialization utility” on page 76.
294 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Utility Description Comment
Image copy utilities reject any attempt to image copy HALDB ILDSs or PHIDAM
prime index data sets. Recovery utilities reject any attempt to recover HALDB
ILDSs or PHIDAM prime index data sets. Both Image Copy and Recovery utilities
can only run against a particular data set of a HALDB partition.
298 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Related publications
The publications listed in this section are considered particularly suitable for a
more detailed discussion of the topics covered in this publication.
IBM Redbooks
For information on ordering these publications, see “How to get IBM Redbooks”
on page 300. Note that some of the documents referenced here may be available
in softcopy only.
A DBA’s View of IMS Online Recovery Service, SG24-6112
Ensuring IMS Database Integrity Using IMS Tools, SG24-6533
IMS DataPropagator Implementation Guide, SG24-6838
IMS e-business Connectors: A Guide to IMS Connectivity, SG24-6514
IMS Installation and Maintenance Processes, SG24-6574
IMS in the Parallel Sysplex, Volume I: Reviewing the IMSplex Technology,
SG24-6908
IMS Primer, SG24-5352
IMS Version 7 High Availability Large Database Guide, SG24-5751
IMS Version 8 Implementation Guide - A Technical Overview of the New
Features, SG24-6594
IMS Version 7 Java Update, SG24-6536
IMS Version 7 Performance Monitoring and Tuning Update, SG24-6404
IMS Version 7 Release Guide, SG24-5753
Using IMS Data Management Tools for Fast Path Databases, SG24-6866
Other publications
These publications are also relevant as further information sources:
IMS Image Copy Extensions for OS/390, V1R1, User’s Guide, SC27-0924
IMS Index Builder for Z/OS, V2.R User’s Guide, SC27-0930
IMS High Performance Load for OS/390, V1R1, User’s Guide, SC27-0938
Online resources
These Web sites and URLs are also relevant as further information sources:
IMS home page
http://www.ibm.com/ims
IBM Redbooks home page
http://www.ibm.com/redbooks
IBM Data Management Tools home page
http://www.ibm.com/software/data/db2imstools/
Technical documents: Flashes, presentations, hints, tips, and Technotes
http://www.ibm.com/support/techdocs/
300 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Index
Symbols C
Change Accumulation 230–231
/DBD 214, 221
change accumulation group 42
/DBDUMP 218
change version numbe 33
/DBR 214, 221
CHANGE.DB 35–36, 68, 75, 78, 266, 292
/DIS 214
CHANGE.DBDS 36–37, 64, 68, 70
/LOCK 214, 220
CHANGE.PART 36–37, 68–69, 292
/START 214, 219, 221
CI size 260
/START DB ALL 221
CICS 198
/STOP 214, 220
command 213
/SX 92–93
CONST 92
/UNLOCK 214, 221
Numerics D
data capture exit 258
5655-B01 (IMS Version 7) ii
Data Capture Exit routine 24
5655-C56 (IMS Version 8) ii
data conversion user exit 258
5655-E50 (Online Recovery Service Version 1) 231
Data Conversion User Exit routine 24
5655-I01 (HALDB Conversion Aid Version 1) 152
data set name prefix 18, 33, 259
5655-K47 (HALDB Conversion and Maintenance
database
Aid Version 2) 151
PHIDAM 7
Database Change Accumulation 230
A database data set group 42
ACBGEN 130, 142, 147 Database Data Set Initialization 99
ACCESS 91, 138, 219 database group 42
access intent 219 Database Image Copy 228–229
ACCESS operand 26 Database Image Copy 2 228–229
ALL keyword 221 DATABASE macro 25
ALLOC 40, 267 Database Partition Data Set Initialization 76
ALLOCATE 139 Database Partition Data Set Initialization utility 74
allocation 35 Database Prefix Resolution 76
APAR 78, 100–101, 250, 291–292 Database Prereorganization 99
authorization 35 Database Prereorganization utility 74–76
Database Recovery 228, 231, 233
Database Scan 76
B
backout needed 37 Database structure 11
Batch Backout 241 DATASET 91, 138
Bidirectional logical relationships 10 DATASET statement 26
BLDSNDX 292 DB record 32
block size 260 DBCTL 292
BMP 10, 178, 221–222 DBCTL thread 222
Buffer subpools 25 DBD 91, 144
BYTES 92–93 DBDGEN 7–8, 12, 21–22, 24, 45, 49, 62, 90, 130,
144
302 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
IHCXHAL 155 LIST.HISTORY 38
ILDS 11, 14–15, 34, 37, 98, 142, 259, 269, 292 logical relationship 6, 10
ILDSMULTI 100–101, 250, 292 logical relationships 5, 22
ILDSMULTI control statement 250
ILE 14
ILK 12, 14
M
master database 22, 32, 36, 43, 49, 62
image copy 130, 147, 228, 267
master database record 32
Image Copy 2 228–229
MAX 133
Image Copy Extensions 228
MAX control statement 95
image copy needed 34, 37, 75–76, 100, 142, 174,
MIGRATE=YES 90, 96, 101, 136, 147
187, 197, 261, 263–264, 266–267
Migration Aid 130, 139, 147
IMS HALDB Conversion and Maintenance Aid
Migration Aid utility 260, 268
151–152
MIGRATX=YES 101, 142
IMS Image Copy Extensions 228
MPP 178, 193, 222
IMS Index Builder 259, 265, 269
multi-volume OSAM 140
IMS monitor 3
IMS Online Recovery Service 231
IMS Performance Analyzer 3 N
IMS/ESA Partition Support Product 147 naming conventions 17
IMS/ESA Partition Support Product (PDB) 6 NBR 131
Index/ILDS Rebuild utility 41 NBR control statement 95
indirect list data set 11, 18, 282 NOILDS 101, 250, 292
indirect list entry 14 NOILDS control statement 250
indirect list key 12, 14 NOTWIN 92
INIT 36
INIT.DB 24, 32, 36, 62, 82, 292
O
INIT.DBDS 36 ODBA 193, 198
INIT.PART 24, 33–34, 36, 62, 64, 69, 292 ODBA thread 222
IOBF statement 25 Online Database Image Copy 228
ISPF 46 Online Recovery Service 231
IVP 292 OPEN 219
ORS 231
J OSAM 5, 22
JBP 10, 221–222 OSAM block size 91, 260
JMP 193, 222 OSAM sequential buffering 237
K P
key range 80 parallel processing 7
key ranges 10 PART record 32
KEYSTRNG 63, 65 partition database data set record 32
KR control statement 95, 107, 134 partition database record 32–33
partition DBDS record 34
partition definition process 7
L Partition Definition utility 8, 22, 24, 26, 33–35,
LCHILD 92, 138
45–46, 62, 82, 97, 120, 138–139, 208, 260–261,
LIST 38
263
LIST.DB 38
Partition Definition utility (PDU) 22
LIST.DBDS 38
partition high key 34
Index 303
partition ID 11, 14–15, 34, 267 Prefix Resolution 188, 244
partition init needed 33, 37, 67, 75, 248, 260, 274 Prefix Resolution utility 244
Partition init needed flag 34 Prefix Update 188
partition initialization 35, 73, 90 Prereorganization utility 248
Partition Initialization utility 75 primary index 26, 34, 142
partition name 18, 43, 267 prohibit further authorization 36
partition record 32–33 PSINDEX 3, 11, 15, 18, 80, 91–92
partition selection 10, 16, 79 PSNAME 91
partition selection exit 17, 36 PSNAME parameter 26
Partition selection exit routine 32 PTR 91
partition selection exit routine 11, 75, 79, 81 PTR=INDX 92
partition string 34, 37 PTR=SNGL 92
partition structure initialization 83 PTR=SYMB 92
partition structure modification 83
partition structure termination 83
partitioned HDAM 3, 11
R
randomization parameter 260
partitioned HIDAM 3
randomizing module 260
partitioned secondary index 3
RAP 94, 120, 145, 184
PARTSEL 63
RBA 12–15, 29, 102, 126, 187, 252–254, 256
PCB label 292
read only 37
PCB name 292
RECON 31, 46, 90
PDATA 42
recovery group 42
PDB 147
recovery needed 34, 37
PDU 46, 97, 139
RECOVPD 37
PHDAM 3, 11, 14–15, 18, 74, 80, 91
Redbooks Web site 300
PHIDAM 3, 7, 11, 14–15, 18, 74, 80, 91–92, 130
Contact us xv
PHIDAM primary index 37
Remote Site Recovery (RSR) 3
physical pairing 10, 15
REORG 40
PILDS 42
reorganization 5–7, 17
PINDEX 42
reorganization number 11, 14–15
PINIT 34, 37, 260, 263, 266
REUSE 37, 98–99
PQ35893 62, 292
RKSIZE 92
PQ36991 100–101, 250, 292
RMNAME 91
PQ38626 292
RMNAME parameter 26
PQ48421 292
root anchor point 94
PQ49638 78, 292
PQ52858 62, 292
PQ54227 100–101, 250, 292 S
PQ55002 78, 292 SAMPLE control statement 95
PQ55840 292 sample partition selection exit 84
PQ56463 292 SCAN 91
PQ57313 292 SDFSISRC 238
PQ58600 292 secondary index 5–6, 13, 16–17, 22, 87, 90, 251
PQ59888 62, 292 Secondary Index Database Maintenance Exit rou-
PQ61206 292 tine 24
PQ63751 130 secondary indexes 6
PQ65486 292 security 47
PQ65489 292 SEED 96
PQ68573 130 SEGM 91, 138
304 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Segment Edit/Compression Exit routine 24
selection exit 10–11
self healing 245, 251
self healing pointer 269
share level 36
shared secondary index 92
single partition processing 292
subsequence 92–93
symbolic keyword 42
symbolic pointers 92
symbolic pointing 17
system definition 25
T
T 91
TB 91
Timestamp recovery 232
timestamp recovery 16
TSO 46
TSO %DFSHALDB 46
TWIN 91
TWINBWD 91
TYPE 215
TYPEFP 63
TYPEIMS 63
TYPHALDB 38, 63
U
Unconditional partition initialization 292
V
VSAM 5, 22
VSAM CI size 260
VSRBF statement 25
X
XDFLD 92
Index 305
306 The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
The Complete IMS HALDB Guide All You Need to Know to Manage HALDBs
Back cover ®