Deleting objects

To delete an object, you can use the Delete Object (DLTOBJ)command, a delete (DLTxxx) command for that type of object, or the delete option on the Work with Objects display (shown from the Work with Libraries (WRKLIB) display).

To delete an object, you must have object existence authority to the object and execute authority to the library. Only the owner of an authorization list, or a user with *ALLOBJ special authority, can delete the authorization list.

When you delete an object, you must be sure no one else needs the object or is using the object. Generally, if someone is using an object, it cannot be deleted. However, programs can be deleted unless you use the Allocate Object (ALCOBJ) command to allocate the program before it is called.

Some create commands, such as commands that are used to create programs, commands, and device files, have a REPLACE option. This option allows users to continue using the old version of a previously replaced object. The system stores the old versions of these objects in library QRPLOBJ.

You should be careful of deleting objects that exist in the system libraries. These objects are necessary for the system to perform properly.

On most delete commands, you can specify a generic name in place of an object name. Before using a generic delete, you can specify the generic name with the Display Object Description (DSPOBJD) command to verify that the generic delete will delete only the objects you want to delete.