Did you know that in the IBM i 7.1 release, a new command was added to delete an object? I’m sure you can easily figure out what the name of the command is. Did you also know that in the 6.1 release, the API to delete an object was added?
The Delete Object (DLTOBJ) command (or the Delete Object API) is similar to the other object commands, for example Dump Object or Move Object, where you specify the name of the object along with the object type. Not all object types are supported by the generic Delete Object command or API, but many of them are. Some of the DLTxxx commands have additional parameters; if you use the generalized DLTOBJ interface to delete these objects, the system will use the default values that could have been specified on the more specific DLTxxx command (these default values are documented in the Delete Object API documentation). The Delete Object API also documents the object types that are supported by these interfaces.
There are a few advantages that you have when using the DLTOBJ command:
- You can delete multiple libraries (object type of *LIB) with one DLTOBJ command by specifying a generic name. Be careful!
- You can specify *ALL for the object name and have an easy way to delete all of the objects of a specific type from a library. Be careful!
- You can delete an object from a specific ASP or a group of ASPs by using the ASPDEV parameter.
And here’s a little bit of trivia for you … the request for providing a generic delete command originated back in 1990; it may take IBM a little while, but good ideas are not forgotten, they sometimes just take some time to work their way to the top of the priority list.
This blog post was originally published on IBMSystemsMag.com and is reproduced here by permission of IBM Systems Media.