You can delete a segment type from a database by using
either the reorganization utilities provided by IMS or by using your own unload and reload program.
You can delete a segment type from a database,
using the reorganization utilities, if:
- The existing relative order of segments in the database record
does not change. In other words, the existing parent to child relationships
cannot change.
- The existing segment names do not change.
To use the reorganization utilities to delete a segment type
from the database:
Procedure
- Code and execute an application program to delete all occurrences
of the segment type being deleted. You must code and execute the application
program before the database is unloaded.
- Determine whether the change you are making affects the
code in any application programs. If the code is affected, make sure
it gets changed.
- Unload your database, using the existing DBD.
- Code a new DBD. You need to remove SEGM= statements from
the DBD for:
- The segment type being deleted
- The children of the deleted segment.
- If the change you are making affected the code in application
programs, make any necessary changes to the PSBs for those application
programs. If you have the DB/DC Data Dictionary, it can help you determine
which application programs and PCBs are affected by the DBD changes
you have made.
- Recalculate database space.
You need to do
this because the change you are making will result in different requirements
for database space.
- Rebuild the ACB if you have ACBs prebuilt rather than built
dynamically.
- For non-VSAM data sets, delete the old database space and
define new database space. For VSAM data sets, delete the space allocated
for the old clusters and define space for the new clusters.
- Reload your database using the new DBD. Remember to make
an image copy of your database as soon as it is reloaded.
- If your database uses logical relationships or secondary
indexes, you must run reorganization utilities before and after reloading
to resolve prefix information.