DLTDLO (Delete Document Library Object)
Purpose
The Delete Document Library Object (DLTDLO) command deletes document library objects from the system.
This command is used to recover disk storage space when system storage becomes critical. It is also used to delete documents and folders that are no longer needed, and generates a request to remove the document from the text index if there is a text entry in the index.
Restrictions
- The user of this command must have *ALL, *ALLOBJ, or *SAVSYS authority.
- Pressing the Enter key deletes the objects immediately; there is no prompting before the document or folder is deleted.
- A document or folder that is in use is not deleted.
- When more than one document or folder is specified for deletion, but one of the documents or folders is in use or the user is not authorized to it, a message is sent and the other documents specified for deletion are deleted except the one either being used or restricted by lack of authority.
- While using this command, the user may encounter an error message indicating that internal objects are locked. This means that another user is using a document library function that cannot run at the same time as the DLTDLO command. Therefore, retry this command later.
- If a folder, and all documents and folders within it, is being deleted, any document or folder that cannot be deleted from the folder remains, causing the original folders to remain as well; all others are deleted. A message is sent indicating the documents and folders that cannot be deleted.
- Any combination of FLR, CRTDATE, CHKEXP, DOCCLS, CMDCHRID, and OWNER may be used when DLO(*SEARCH) is specified. When more than one of them is specified, only those documents and folders which meet all of the specified criteria are deleted. Though the FLR parameter can be specified under the preceding criteria, it is not limited to this criteria. The FLR parameter and the SYSOBJNAM parameter are mutually exclusive. It can be specified in any combination except when DLO(*SYSOBJNAM) or the SYSOBJNAM parameter is specified.
- The document descriptors are searched to locate and delete document library objects that match the search values.
- CRTDATE contains two lists of two elements each. *N must be specified for an element that precedes the values being specified to maintain that element's position within the parameter value sequence when previous elements in the list are deleted.
- An ASP value of *ANY can be specified only when DLO(*ALL) FLR(*ANY) or DLO(*SEARCH) FLR(*ANY) is specified.
Required Parameters
- DLO
- Specifies the document library objects (documents and/or folders) that are deleted. If DLO(*SEARCH) is not specified, CRTDATE, CHKEXP, DOCCLS, CMDCHRID, and OWNER cannot be specified.
*ALL: All documents or folders currently filed in the folder specified in the FLR parameter are deleted. Only the security officer or a user with *SECADM special authority can specify DLO(*ALL) with FLR(*ANY) or FLR(*NONE).
*SEARCH: All documents or folders currently filed in the document library and are described by the FLR, CRTDATE, CHKEXP, DOCCLS, and OWNER values are deleted.
*SYSOBJNAM: The system object name for the documents or folders specified in the SYSOBJNAM parameter is used.
document-library-object-name: Specify one or more iSeries 400 document or folder names of specific documents or folders being deleted. Up to 300 documents or folders can be specified. More information on this parameter is in folder and document names.
Optional Parameters
- FLR
- Specifies the name of the folder that contains the document.
Note: More information on folder names is in folder and document names. *NONE: The document or folder is not located in a folder. This implies that DLO(*SEARCH) and DLO(*ALL) apply only to the set of all documents and folders not in folders.
*ANY: A system-wide search is made for the documents to be deleted. This implies that DLO(*SEARCH) and DLO(*ALL) apply to the set of all documents and folders, including those not found in folders.
folder-name: Specify the name of the folder that contains the documents and/or folders being deleted.
- CRTDATE
- Specifies that documents or folders filed during the specified time period are deleted. If this parameter is specified, then DLO(*SEARCH) must also be specified. For a document or folder being selected, it must have been created on or after the starting time and date, and before or on the ending time and date. This parameter contains two lists of paired elements, one for the starting time and date and one for the ending time and date as follows:
((start-time start-date) (end-time end-date))If CRTDATE is not specified, the following values are assumed:
((*AVAIL *CURRENT) (*AVAIL *END))
Element 1: Starting Time
Use one of the following values to specify the starting time. Documents and folders must have been created after this time to be deleted. Documents and folders created before this time are not deleted.
*AVAIL: Documents and folders created at any time can be deleted.
starting-time: Specify deletion of only those documents and folders that were created at or after the specified time on the starting date. When the start-time is used as a search value, the start-date must not be *BEGIN. The time is specified in 24-hour format with or without a time separator as follows:
- With a time separator, specify a string of 5 or 8 digits, where the time separator for the job separates the hours, minutes, and seconds. If you issue this command from the command line, the string must be enclosed in apostrophes. If a time separator other than the separator specified for your job is used, this command fails.
- Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds. Valid values for hh range from 00 through 23. Valid values for mm and ss range from 00 through 59.
Element 2: Starting Date
Use one of the following values to specify the starting date. Documents and folders must have been created on or after this date in order to be selected for deletion. Documents and folders created before this date cannot be deleted.
*CURRENT: The current date is used.
*BEGIN: Documents and folders created on any date can be deleted. The starting date and time is ignored.
starting-date: Specify deletion of only those documents and folders created on or after the date specified. The date must be entered in the format specified by the system value QDATFMT and, if separators are used, QDATSEP.
Element 3: Ending Time
Use one of the following values to specify the ending time. Documents and folders must have been created at or before this time to be deleted. Documents and folders created after the specified time cannot be deleted.
*AVAIL: Documents and folders created at any time can be deleted.
ending-time: Specify deletion of documents and folders that were created at or before the specified time on the ending date. When the end-time is used as search values, the end-date must not be *END. See the description of starting-time for details about how time can be specified.
Element 4: Ending Date
Use one of the following values to specify the ending date. Documents and folders must have been created on or before this date to be deleted. Documents and folders created after this date cannot be deleted.
*END: Documents and folders created on any date can be deleted. The ending time is ignored when *END is specified.
ending-date: Specify selection of documents and folders created on or before this date. The date must be specified in the format specified by the system value QDATFMT or, if separators are used, QDATSEP.
- CHKEXP
- Specifies the expiration date of the documents being deleted. The expiration date is assigned to specify when a document is no longer needed. A document with an expiration date (as specified by the user on the Describe Document display) before the date specified, is deleted. If this parameter is specified, then DLO(*SEARCH) must also be specified.
*NO: The expiration date for the document is ignored.
*CURRENT: All documents with an expiration date earlier than today's date are deleted.
document-expiration-date: Specify a date when all documents are to be deleted.
- DOCCLS
- Specifies the class of documents being deleted. Any character string can be used to specify the document class when creating a document; for example, SPECIFICATION, MEMO, FORM, or PAYROLL. If this parameter is specified, then DLO(*SEARCH) must also be specified.
*ANY: The DOCCLS parameter is not used to select the documents being deleted. Documents meeting the requirements of the other parameters are deleted.
document-class: Specify a character string ranging from 1 through 16 characters in length to select documents for deletion. The iSeries 400 does not define a meaning for document-class; that is, when creating a document, any character string can be entered into the document class. For comparison, the document class specified and the document class of all documents are changed to uppercase where necessary.
- CMDCHRID
- Specifies the character identifier (graphic character set and code page) for data being specified as parameter values on this command. This character identifier (CHRID) is related to the display device used to specify the command. More information about CHRID processing is in the Application Display Programming
book.
*SYSVAL: The system determines the graphic character set and code page values for the command parameters from the QCHRID system values.
*DEVD: The system determines the graphic character set and code page values for the command parameter from the display device description where the command is entered. This option is valid only when specified from an interactive job. If this value is specified in an interactive CL program or a batch job, an error message is sent.
Element 1: Character Set
graphic-character-set: Specify the graphic character set of the class of documents being deleted. Valid values range from 1 through 999.
Element 2: Code Page
code-page: Specify the code page value used to create the command parameters. Valid values range from 1 through 999.
- OWNER
- Specifies the owner of the documents and folders being deleted. If this parameter is specified, then DLO(*SEARCH) must also be specified.
*CURRENT: The user profile that is currently running is used.
*ALL: Documents and folders are selected for deletion without regard to the owners. Only a security officer or a user with *SECADM special authority can specify OWNER(*ALL).
user-profile-name: Specify the name of the user who owns the documents and folders being deleted. Only a security officer or a user with *SECADM special authority is authorized to specify a user profile name other than that belonging to the user who issues this command.
- SYSOBJNAM
- Specifies the system object name. This parameter is valid only when DLO(*SYSOBJNAM) or DOCL(*SYSOBJNAM) is specified. A full ten characters must be specified.
- ASP
- Specifies the identifier (ID) of the auxiliary storage pool (ASP) of the document library object to be deleted. A value other than *ANY can be specified on this parameter only if *ALL or *SEARCH is specified on the DLO parameter and *ANY is specified on the FLR parameter.
*ANY: The objects to be deleted reside in any ASP. When *ALL is specified on the DLO parameter, all document library objects on the system are deleted.
ASP-ID: Only the document library objects that reside in the specified ASP are to be deleted. All document library objects in other ASPs are ignored. Valid values range from 1 through 16 and must designate an existing ASP that contains document library objects. ASP 1 is the system ASP.
Note: This option is provided to aid in recovery from damage to a user ASP, particularly one that has overflowed. The document library objects and their details are deleted from the damaged ASP (after the necessary data recovery actions are taken for the ASP), thereby removing overflowed objects and potentially damaged objects from the ASP prior to restoring from backup media. More information on document library objects in ASPs is in the Backup and recovery topic in the Information Center. Examples for DLTDLO
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 and recovery topic in the Information Center has more information about synchronizing document descriptors.
Error messages for DLTDLO
*ESCAPE Messages
- CPF2204
- User profile &1 not found.
- CPF8A16
- Document library objects not deleted. &1 objects deleted.
- CPF9005
- System resource required to complete this request not available.
- CPF9006
- User not enrolled in system distribution directory.
- CPF9012
- Start of document interchange session not successful for &1.
- CPF9029
- Not allowed to specify owner profile &1.
- CPF903A
- Document or folder activity not stopped, requested operation cannot be done.
- CPF9031
- No authority to specify DLO(*ALL).
- CPF9032
- Document interchange session not started.
- CPF9046
- No documents found satisfying search specification in folder &1.
- CPF9062
- Date must be specified when time not *AVAIL.
- CPF9063
- Starting and ending CRTDATE specified in reverse order.
- CPF9096
- Cannot use CMDCHRID(*DEVD), DOCCHRID(*DEVD) in batch job.
- CPF9845
- Error occurred while opening file &1.
- CPF9846
- Error while processing file &1 in library &2.
- CPF9847
- Error occurred while closing file &1 in library &2.