CL Command Reference - DLTDLO
CL Command List > DLTDLO Reference
Description:
The Delete Document Library Object (DLTDLO) command allows you to delete a document or a folder.
This command is used to delete documents and folders that are no longer needed from the system, which prevents system storage from being used for obsolete objects.
Note: When a document is deleted, a request is generated to remove its entry (if it exists) from the text index.
Restrictions:
. To delete a document or folder, you must have all (*ALL) authority for the document or folder, all object (*ALLOBJ), or security administrator (*SECADM) special authority.
. You must have *ALLOBJ or *SECADM special authority to delete all documents or folders or to specify an owner other than yourself.
. Once you press the Enter key, the specified document or folder is deleted; there is no prompting before the document or folder is deleted.
. If the document or folder is in use, the document or folder is not deleted.
. When more than one document or folder is specified for deletion but one of the documents or folders cannot be deleted because it is in use, or you are not authorized to it, a message is sent, and the function continues to delete those documents or folders that remain in the list.
. If a folder and all documents and folders within it are being deleted, any document or folder that cannot be deleted from the folder remains, but all others are deleted. A message is sent concerning those documents and folders that cannot be deleted.
. While using this command, you may encounter an error message indicating that internal objects are locked. Another user is using document library functions which cannot run at the same time as the DLTDLO command; therefore, retry this command in a few minutes.
. An ASP value of *ANY can be specified only when DLO(*ALL) FLR(*ANY) or DLO(*SEARCH) FLR(*ANY) is specified.
Examples:
Example 1: Deleting a Folder
DLTDLO DLO(ABC)
This command deletes folder ABC if it contains no documents or folders.
Example 2: Deleting All Documents and Folders Within a Folder
DLTDLO DLO(*ALL) FLR(ABC)
This command deletes all the documents and folders that the user is authorized to delete from folder ABC. If folder ABC turns out to be empty, then it is also deleted.
Example 3: Deleting All Documents in a Document Class, Using *SECADM Special Authority
DLTDLO DLO(*SEARCH)
CRTDATE((*AVAIL 080187) (*AVAIL 083187))
DOCCLS(LETTERS) OWNER(*ALL)
This command deletes all documents in document class LETTERS that were filed in the system during August 1987. Only the security officer or a user with *SECADM special authority is allowed to specify OWNER(*ALL).
Example 4: Deleting Current User¡¯s Documents
DLTDLO DLO(*SEARCH) CRTDATE((*AVAIL *BEGIN) (*AVAIL *END))
DOCCLS(*ANY) OWNER(*CURRENT)
This command deletes all documents belonging to the current user.
Example 5: Deleting User¡¯s Documents Filed Today
DLTDLO DLO(*SEARCH)
This command deletes all documents belonging to the specified user that were filed on that day.
Example 6: Deleting Documents and Folders With Document Descriptors
DLTDLO DLO(*SEARCH) CRTDATE((*AVAIL *BEGIN) (*AVAIL *END))
DOCCLS(*ANY) OWNER(*ALL)
This command deletes all documents and folders with document descriptors from the system. If the document descriptors are not synchronized with the document and folder objects, then they are the same as DLO(*ALL). The Backup, Recovery, and Availability topic in the Information Center has more information about synchronizing document descriptors.