ZOMDestroy

Erases selected objects and deletes their dictionary and object descriptions.

Syntax

ZOMDestroy <object specification> [<option>...]

Options

;1 NOERASE

This option indicates that destroy is to not erase the object. This is especially useful in the case of predefined objects that are described in the Object Dictionary (e.g., ZimPROF, printer). You might want to remove the descriptions of these predefined objects but not erase the objects themselves.

Comments

The ZOMDestroy command deletes both Object Dictionary definitions, and erases the created objects for the objects specified in the object list specification. All references to the object in the data dictionary are deleted. The object is not destroyed at the operating system level.

It is important to differentiate among erasing an object, deleting an object, and destroying an object. Erasing an object undoes the act of creating an object. Creation takes a Object Dictionary description and uses it as the basis for constructing a system representation of the object in the indicated directory. Thereafter, the object can be used. Erasing an object erases this system representation, but still leaves the Object Dictionary description intact. Deleting an object deletes the object's description from the Object Dictionary, but leave its system representation intact. Destroying executes both an erase and a deletion, as well as deleting the registration information from the Object Dictionary. An object can be erased and deleted without being destroyed, if the ZOMErase and ZOMDelete functions are executed separately.

This command checks the set of objects to be processed for locked objects prior to executing. If there are locked objects to be processed, the command issues an error and exits. An object is considered to be locked if it is locked itself, or is in a locked directory. For information about setting and clearing locks, refer to ZOMSet.

This operation can potentially affect the status of programs and objects which depend on the destroyed objects. If ZOM is configured with its Explode Level to be 1, then this command finds the dependent objects and touch them.

 Refer to ZOMConfig and the discussion of dependencies in Object Dependencies.

Examples

The following command destroys the object named "Customers." Its description in the Object Dictionary is deleted, it is erased, and its registration in ZOM is deleted.

ZOMDestroy Customers

The following command destroys the objects keyworded by the keyword "$ziminit" with the NOERASE option active. This causes the Object Dictionary information and registration to be deleted, but the objects are not erased from the environment.

ZOMDestroy +k $ziminit ;1 NOERASE