Deleting runtime database resource and descriptor definitions with the DELETE command
With dynamic resource definition (DRD) enabled, you can delete runtime resource and resource descriptors dynamically, eliminating the need to use the online change process or the batch system definition process with an IMS cold start.
Delete runtime database resource and descriptor definitions using the DELETE DB and DELETE DBDESC commands.
Procedure
- Check for work in progress with a QRY DB SHOW(WORK) command.
If there is work in progress, either:
- Wait for the work to finish.
- Address the work in progress.
- Determine whether any application programs reference the
database by issuing a QRY DB SHOW(PGM) command.
The DELETE DB command fails if any programs reference
the database. If a program references the database, before deleting
the database, you must either:
- Delete the programs that reference the database. If you decide to delete the programs that reference the database, and if there are transactions or routing codes that reference the programs, they must be deleted first.
- Perform an online change to delete the PSB from ACBLIB.
- Update the PSB so that it does not reference the database.
- The next step varies depending on whether the resource
to be deleted is a database with secondary or logical relationships,
an MSDB, or a HALDB master database.
- If the resource to be deleted is a database with secondary
indexes or logical relationships, remove the relationships by performing
these steps:
- Update the database description (DBD) to remove the relationships.
- Run the Database Description Generation (DBDGEN) utility.
- Run the Application Control Block (ACB) Maintenance utility.
- Bring the updated DBDs and ACBs online using an online change process.
- If the resource to be deleted is a main storage database (MSDB),
perform these steps:
- Use the MSDB Maintenance utility (DBFDBMA0) to remove segments from the MSDBINIT data set.
- Delete the MSDB from any PSB that references it using the DELETE DBD= action control statement of DBFDBMA0.
- Perform a PSBGEN for the PSB that was modified.
- Perform an ACBGEN for the PSB that was modified.
- Perform an ACBGEN for the DBD of the MSDB that was deleted from the PSB.
- Either change or remove the appropriate DBFMSDBx procedure that is in the IMS.PROCLIB data set.
- Shut down IMS normally using the /CHE FREEZE command.
- Copy the above ACBLIB to both the active and inactive ACBLIB.
- Normally restart IMS using the /NRE command specified with the MSDBLOAD keyword to refresh the MSDBs.
- If the resource to be deleted is a HALDB master database,
perform these steps:
- Issue a /DBRECOVERY command.
The /DBRECOVERY command removes this IMS system's knowledge of the HALDB partitions and stops the HALDB master database so that it can be deleted.
- Issue a /DBRECOVERY command.
- If the resource to be deleted is a database with secondary
indexes or logical relationships, remove the relationships by performing
these steps:
- Stop the database using either a /DBR DB or
an UPDATE DB STOP(ACCESS) command. A database must be successfully stopped by /DBR command before it can be deleted. Because the MSDB is no longer in the ACBLIB, IMS does not know that the database was previously an MSDB and allows the /DBR command.
- Issue the DELETE DB or DELETE DBDESC command to delete the database resource or descriptor definition, respectively.