Database modifications supported by database versioning
When you maintain multiple versions of a database, you can make only certain structural changes to the new versions of the database.
Database versioning supports the following
changes to a database definition:
- An increase to the length of a segment.
- The addition of new fields to existing undefined space at the end of a segment.
Attention: Before you add new
fields to a segment in existing space that is undefined to IMS, you must
make sure that your existing application programs do not initialize,
modify, or otherwise use the free space.
Database
versioning does not support the following changes:
- An increase to the length of a variable-length segment
- A change in the starting position of an existing field
- A change in the length of an existing field
The following series of segment definitions provide examples of the types of changes that are supported by database versioning.
For the purpose of these examples, assume that the following
segment is defined in an existing database before versioning is enabled.
This is version 0 of the database.
----------------------------
| FLD1 | FLD2 | space |
----------------------------
After database versioning is enabled, the definition
of the database is changed to increase the length of the segment,
resulting in more undefined space at the end of the segment in version
1 of the database.
-------------------------------------
| FLD1 | FLD2 | space | space |
-------------------------------------In version 2 of the database, a new field, FLD3, is defined in the extra space at the end of the segment, resulting in the following segment.
Attention: Before you make a change like the one shown in the
following example, you must confirm with your applications group that
none of your existing application programs do anything with the free
space, such as initialize it during REPL calls or use it in any way.
If they do, extend the length of the segment and add your new field
after the existing space, like fields FLD4 and FLD5 in the example
for version 3, which is shown after the following example.
-------------------------------------
| FLD1 | FLD2 | space | FLD3 |
-------------------------------------In version
3 of the database, the length of the segment is increased further
and more fields, FLD4 and FLD5, and undefined space are added after
FLD3.
----------------------------------------------------------------
| FLD1 | FLD2 | space | FLD3 | FLD4 | FLD5 | space |
----------------------------------------------------------------