An NDB can be deleted by using the standard VSAM (IDCAMS) DELETE command:
DELETE clustername CL
If the NDB is in use, then it must first be closed. To accomplish this, issue the following commands:
NDB STOP dbname IMM LOCK UDBCTL CLOSE=dbname UNALLOC DD=dbname
The NDB STOP command, with the IMM and LOCK operands, immediately stops the database, if it is active, and locks it from further access by any NDB commands or &NDBxxx statements. Any currently signed on users are given response 250 on their next request.
The UDBCTL CLOSE command physically closes the data set.
The UNALLOC command frees the data set so that it can be deleted.
Following the successful completion of the commands, the IDCAMS DELETE can then be issued.
If the NDB is being deleted in preparation for reuse as an empty database, then the NDB RESET command provides a more convenient way to do this. Alternatively, if the data set was defined to VSAM with the REUSE option, then a UDBCTL OPEN RESET command causes VSAM to clear the data set back to empty.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |