DELETE DB command
Use the DELETE DB command to delete database resources.
Subsections:
Environment
The following table lists the environments (DB/DC, DBCTL, and DCCTL) in which you can use the command and keywords.
Command / Keywords | DB/DC | DBCTL | DCCTL |
---|---|---|---|
DELETE DB | X | X | |
NAME | X | X | |
OPTION | X | X |
Syntax
.-,-----. V | >>-+-DELETE-+--DB--NAME(---name*-+-)--+----------------+------->< '-DEL----' '-OPTION(ALLRSP)-'
Keywords
The following keywords are valid for the DELETE DB command:
- NAME
- Specifies the 1-8 character name of the database. Wildcards are supported in the name. Examples of valid names are NAME(*) and NAME(abc*). If the NAME parameter specified is a specific or wildcard name, command responses are returned for all the resource names that are processed. For NAME(*), command responses are returned only for the resource names that resulted in an error. For a DEL DB command when the database contains Fast Path areas, if all areas are successfully deleted, no area names are displayed. If the delete fails for any area, then all area names are displayed to show which deletes were successful and which were not.
- OPTION
- Specifies additional functions to be performed along with the
command.
- ALLRSP
- Indicates that the response lines are to be returned for all resources that are processed on the command. The default action is to return response lines only for the resources that resulted in an error. The ALLRSP keyword is valid only if NAME(*) is specified.
Usage notes
This command can only be issued through the Operations Manager API. This command applies to DB/DC systems, DBCTL systems, and DCCTL systems.
The DELETE DB command is not valid on the XRF alternate, RSR tracker, or FDBR region. This command is not valid if online change for MODBLKS is enabled (DFSDFxxx or DFSCGxxx defined with MODBLKS=OLC or MODBLKS not defined).
This command is recoverable.
Each database is deleted individually, unlike the online change process where either all databases are deleted or no databases are deleted. The runtime resource definition for a database can only be deleted if the database is not in use. If the database is in use, the delete fails. In a sysplex environment with multiple IMS™ subsystems, the delete might succeed on some IMS subsystems and fail on others.
The DELETE DB command removes ACB members from the 31-bit nonresident pool as well as the 64-bit storage pool.
The resources remain deleted across an IMS warm start or emergency restart. To ensure that the resources remain deleted across a cold start, the existing resource definitions must be exported to a system RDDS and then imported from the RDDS at cold start. Or, if the IMSRSC repository is enabled, the DELETE DEFN command must be issued to delete the definition from the repository. If the resource definitions are to be imported from the MODBLKS data set at cold start instead of from an RDDS or the repository, the resource definitions must be deleted from system definition and a new MODBLKS data set must be generated.
The database can be HSAM, HISAM, HDAM, HIDAM, DEDB, or a HALDB master database. The database cannot be a HALDB partition. If a database is logically related to another database, you need to consider whether the logically related databases should also be deleted. For example, if the database is a HIDAM database, both the primary database and the index database must be deleted.
To delete a HALDB master database, a /DBRECOVERY command must be issued. The /DBRECOVERY command removes this IMS subsystem's knowledge of the HALDB partitions and stops the HALDB master database so that it can be deleted.
Output fields
- Short label
- Contains the short label generated in the XML output.
- Long label
- Contains the long label generated in the XML output.
- Keyword
- Identifies keyword on the command that caused the field to be generated. N/A appears for output fields that are always returned. error appears for output fields that are returned only in case of an error.
- Meaning
- Provides a brief description of the output field.
Short label | Long label | Keyword | Meaning |
---|---|---|---|
CC | CC | N/A | Completion code. |
CCTXT | CCText | error | Completion code text that briefly explains the meaning of the nonzero completion code. |
DB | DBName | N/A | Database name being deleted. |
ERRT | ErrorText | error | Error text that provides diagnostic information. Error text can be returned for a nonzero completion code and further explains the completion code. |
MBR | MbrName | N/A | IMSplex member that built the output line. |
TYPE | Type | DB | Resource type, which can be AREA, DEDB, DL/I, or blank (unknown). Resource type is returned only if areas are returned. |
Return, reason, and completion codes
The following table includes the return and reason codes and a brief explanation of the codes. The return or reason code returned for the command might also indicate an error from a CSL request.
Return code | Reason code | Meaning |
---|---|---|
X'00000000' | X'00000000' | Command completed successfully. The command output contains a line for each resource, accompanied by its completion code. If NAME(*) is specified without OPTION(ALLRSP), no output lines are returned. See the completion code table for details. |
X'0000000C' | X'00003000' | Command was successful for some resources but failed for others. The command output contains a line for each resource, accompanied by its completion code. If NAME(*) is specified without OPTION(ALLRSP), only resources with nonzero completion codes are returned. See the completion code table for details. |
X'0000000C' | X'00003004' | Command was not successful for any of the resources. The command output contains a line for each resource, accompanied by its completion code. See the completion code table for details. |
X'00000010' | X'0000400C' | Command is not valid on the XRF alternate. |
X'00000010' | X'00004014' | Command is not valid on the RSR tracker. |
X'00000010' | X'00004120' | Online change phase is in progress. |
X'00000010' | X'00004200' | The DELETE DB command is not processed because IMS shutdown is in progress. |
X'00000010' | X'00004300' | Command is not allowed because online change for MODBLKS is enabled (DFSDFxxx or DFSCGxxx defined with MODBLKS=OLC, or MODBLKS not defined). |
X'00000010' | X'00004301' | Command is not allowed because the database has a logical relationship with another database. |
X'00000014' | X'00005004' | DFSOCMD response buffer could not be obtained. |
X'00000014' | X'00005008' | DFSPOOL storage could not be obtained. |
X'00000014' | X'0000500C' | AWE could not be obtained. |
Errors unique to the processing of this command are returned as completion codes. The following table includes an explanation of the completion codes.
Completion code | Completion code text | Meaning | Error text |
---|---|---|---|
0 | Command completed successfully for database. | ||
8 | COMMAND COMPLETE FOR SOME | Command completed for some of the areas. Area names are returned with a completion code. | |
C | COMMAND COMPLETE FOR NONE | Command failed for all of the areas. Area names are returned with completion codes. | |
10 | NO RESOURCES FOUND | Database name is invalid, or the wildcard parameter specified does not match any database names. | |
17 | ANOTHER CMD IN PROGRESS | Another command (such as DELETE or UPDATE) is in progress for this database. This could also mean this command, if the resource is specified by more than one specific or wildcard parameter. | |
23 | DB STOP ACCESS IN PROGRESS | A /DBRECOVERY or UPDATE DB STOP(ACCESS) command to stop database access is in progress. This takes the database offline. | |
25 | DB STOP UPDATES IN PROGRESS | A /DBDUMP or UPDATE DB STOP(UPDATES) command to stop database updates is in progress for the database. | |
26 | DEDB STOP IN PROGRESS | A /DBRECOVERY, /STOP, or UPDATE DB STOP(SCHD) command to stop database scheduling is in progress for a DEDB. | |
27 | REJECTED FOR DEFAULT DESCRIPTOR | DELETE command not allowed for user-defined default descriptor. You must issue an UPDATE command to set another descriptor as the default before deleting this descriptor. | |
60 | GETMAIN STORAGE ERROR | A GETMAIN request for storage was unsuccessful. | |
61 | DFSBCB STORAGE ERROR | A storage request for a DDIR block failed. | |
65 | DMB POOL STORAGE ERROR | During a DELETE command for a DB resource, there was an error in the DMB pool processing of a resident DMB. | |
6C | NOT ALLOWED FOR HALDB PARTITION | DELETE is not allowed for a HALDB partition. | |
6F | REFERENCED BY PROGRAM | Program references the database to be deleted. The program name that references this database to be deleted is returned as error text. Suggested actions: Use online change for ACBLIB to change the PSB to no longer reference the database to be deleted or delete the PSB or issue DELETE PGM. | pgmname (8 characters) |
76 | RECOVER CMD ACTIVE | RECOVER START command is in progress to recover one or more databases with the database recovery services. | |
77 | DEPENDENT REGIONS ACTIVE | One or more active dependent regions reference the database. | |
90 | INTERNAL ERROR | An IMS system service failure. | |
DE | ACBLIB READ FAILURE | A read request for a member in ACBLIB failed. | |
E1 | DB MUST BE STOPPED AND OFFLINE | The database must be stopped and taken offline in order for the database to be deleted. You might need to issue a /DBR DB command or an UPDATE DB STOP(ACCESS) command to stop the database and take it offline before issuing the DELETE DB command. | |
E2 | PARALLEL DB OPEN NOT COMPLETE | The DELETE DB command was rejected because DB parallel open is in progress. | |
![]() ![]() |
![]() ![]() |
![]() ![]() |
![]() ![]() |
Examples
The following are examples of the DELETE DB command:
Example 1 for DELETE DB command
DEL DB NAME(DBHIDO*,BADNAME,DEDBJ%%1,IPODB)
Response for: DEL DB NAME(DBHIDO*,BADNAME,DEDBJ%%1,IPODB)
DBName MbrName CC CCText ErrorText
BADNAME IMS1 10 NO RESOURCES FOUND
DBHIDOK2 IMS1 E1 DATABASE HAS NOT BEEN DBR"D
DBHIDOK8 IMS1 6F REFERENCED BY PROGRAM PBODSAGM
DBHIDOK8 IMS1 6F REFERENCED BY PROGRAM PBODSAGR
DBHIDOK8 IMS1 6F REFERENCED BY PROGRAM PBODSALU
DEDBJN01 IMS1 6F REFERENCED BY PROGRAM DDLTLM02
DEDBJN21 IMS1 E1 DATABASE HAS NOT BEEN DBR"D
DEDBJ001 IMS1 E1 DATABASE HAS NOT BEEN DBR"D
DEDBJ011 IMS1 E1 DATABASE HAS NOT BEEN DBR"D
DEDBJ021 IMS1 0
DEDBJ031 IMS1 E1 DATABASE HAS NOT BEEN DBR"D
DEDBJ041 IMS1 E1 DATABASE HAS NOT BEEN DBR"D
DEDBJ051 IMS1 E1 DATABASE HAS NOT BEEN DBR"D
DEDBJ061 IMS1 E1 DATABASE HAS NOT BEEN DBR"D
DEDBJ071 IMS1 E1 DATABASE HAS NOT BEEN DBR"D
DEDBJ081 IMS1 E1 DATABASE HAS NOT BEEN DBR"D
DEDBJ091 IMS1 E1 DATABASE HAS NOT BEEN DBR"D
IPODB IMS1 E1 DATABASE HAS NOT BEEN DBR"D
CMD(DEL DB NAME(DBHIDO*,BADNAME,DEDBJ%%1,IPODB))
<imsout>
<ctl>
<omname>OM1OM </omname>
<omvsn>1.3.0</omvsn>
<xmlvsn>20 </xmlvsn>
<statime>2006.310 23:26:32.420713</statime>
<stotime>2006.310 23:26:32.422399</stotime>
<staseq>BFAACB33F8569D5C</staseq>
<stoseq>BFAACB33F8BFFD5C</stoseq>
<rqsttkn1>USRT011 10152632</rqsttkn1>
<rc>0200000C</rc>
<rsn>00003008</rsn>
<rsnmsg>CSLN054I</rsnmsg>
<rsntxt>None of the clients were successful.</rsntxt>
</ctl>
<cmderr>
<mbr name="IMS1 ">
<typ>IMS </typ>
<styp>DBDC </styp>
<rc>0000000C</rc>
<rsn>00003000</rsn>
<rsntxt>At least one request successful</rsntxt>
</mbr>
</cmderr>
<cmd>
<master>IMS1 </master>
<userid>USRT011 </userid>
<verb>DEL </verb>
<kwd>DB </kwd>
<input>DEL DB NAME(DBHIDO*,BADNAME,DEDBJ%%1,IPODB) </input>
</cmd>
<cmdrsphdr>
<hdr slbl="DB" llbl="DBName" scope="LCL" sort="a"
key="1" scroll="no" len="8" dtype="CHAR" align="left" />
<hdr slbl="MBR" llbl="MbrName" scope="LCL" sort="a" key="2" scroll="no"
len="8" dtype="CHAR" align="left" />
<hdr slbl="CC" llbl="CC" scope="LCL" sort="n" key="0" scroll="yes"
len="4" dtype="INT" align="right" skipb="no" />
<hdr slbl="CCTXT" llbl="CCText" scope="LCL" sort="n" key="0"
scroll="yes" len="*" dtype="CHAR" skipb="yes" align="left" />
<hdr slbl="ERRT" llbl="ErrorText" scope="LCL" sort="n" key="0"
scroll="yes" len="*" dtype="CHAR" skipb="yes" align="left" />
</cmdrsphdr>
<cmdrspdata>
<rsp>DB( DBHIDOK2) MBR(IMS1) CC( E1) CCTXT(DATABASE HAS NOT BEEN
DBR"D) </rsp>
<rsp>DB( BADNAME ) MBR(IMS1) CC( 10) CCTXT(NO RESOURCES FOUND) </rsp>
<rsp>DB( DEDBJN01) MBR(IMS1) CC( 6F) CCTXT(REFERENCED BY PROGRAM)
ERRT(DDLTLM02) </rsp>
<rsp>DB( IPODB ) MBR(IMS1) CC( E1) CCTXT(DATABASE HAS NOT BEEN
DBR"D) </rsp>
<rsp>DB( DBHIDOK8) MBR(IMS1) CC( 6F) CCTXT(REFERENCED BY PROGRAM)
ERRT(PBODSAGM) </rsp>
<rsp>DB( DEDBJN21) MBR(IMS1) CC( E1) CCTXT(DATABASE HAS NOT BEEN
DBR"D) </rsp>
<rsp>DB( DEDBJ001) MBR(IMS1) CC( E1) CCTXT(DATABASE HAS NOT BEEN
DBR"D) </rsp>
<rsp>DB( DEDBJ011) MBR(IMS1) CC( E1) CCTXT(DATABASE HAS NOT BEEN
DBR"D) </rsp>
<rsp>DB( DEDBJ021) MBR(IMS1) CC( 0) </rsp>
<rsp>DB( DEDBJ031) MBR(IMS1) CC( E1) CCTXT(DATABASE HAS NOT BEEN
DBR"D) </rsp>
<rsp>DB( DEDBJ041) MBR(IMS1) CC( E1) CCTXT(DATABASE HAS NOT BEEN
DBR"D) </rsp>
<rsp>DB( DEDBJ051) MBR(IMS1) CC( E1) CCTXT(DATABASE HAS NOT BEEN
DBR"D) </rsp>
<rsp>DB( DEDBJ061) MBR(IMS1) CC( E1) CCTXT(DATABASE HAS NOT BEEN
DBR"D) </rsp>
<rsp>DB( DEDBJ071) MBR(IMS1) CC( E1) CCTXT(DATABASE HAS NOT BEEN
DBR"D) </rsp>
<rsp>DB( DEDBJ081) MBR(IMS1) CC( E1) CCTXT(DATABASE HAS NOT BEEN
DBR"D) </rsp>
<rsp>DB( DEDBJ091) MBR(IMS1) CC( E1) CCTXT(DATABASE HAS NOT BEEN
DBR"D) </rsp>
<rsp>DB( DBHIDOK8) MBR(IMS1) CC( 6F) CCTXT(REFERENCED BY PROGRAM)
ERRT(PBODSAGR) </rsp>
<rsp>DB( DBHIDOK8) MBR(IMS1) CC( 6F) CCTXT(REFERENCED BY PROGRAM)
ERRT(PBODSALU) </rsp>
</cmdrspdata>
</imsout>
Explanation: A DELETE DB command was issued for several databases. The DELETE DB worked for one database, DEDBJ021, as shown by completion code 0. The DELETE DB command failed for several databases with completion code E1, because the databases need to be taken offline by use of the /DBRECOVERY command first. The DELETE DB command failed for databases DBHIDOK8 and DEDBJN01 with completion code 6F, because the databases are referenced by one or more programs. Each program name is displayed as error text.