CL Command Reference - QRYDOCLIB

CL Command List > QRYDOCLIB Reference

Description:

The Query Document Library (QRYDOCLIB) command allows you to search for documents within the document library. A document list is created containing the results of the search. You can also copy information about the documents that satisfy the search request into a database file for processing.

When the QRYDOCLIB command is run, a document list object is created. The document list object is created regardless of whether an output file is produced unless the user specifies *NONE for the DOCL parameter. This document list object is used by the OfficeVision/400 product as well as the SAVDLO command.

Restrictions:

. The current user of this command must have the authority to work on behalf of the specified user ID address. To work on behalf of other users, the user must have special permission granted with the Grant User Permission (GRTUSRPMN) command.

. The format of the output file must be the same as OSIQDL of the system file, QSYS/QAOSIQDL.

. If several QRYDOCLIB commands are run at the same time, the document list name (Document list (DOCL) parameter) and the output file name or member name (File to receive output (OUTFILE) parameter) must be different for each of these QRYDOCLIB commands.


Examples:

QRYDOCLIB USRID(*CURRENT) OUTFILE(*NONE) DOCL(MYLIST)
QRYDFN(*IF ((*DOCD *EQ DOCDESC *AND)
(*DOCCLS *BG CLASS *OR)
(*FILDATE *LE กฏ06/13/88กฏ)))

This command searches for documents that meet the following search conditions: document description equals DOCDESC and document class starts with Class; or the file date is on or before 06/13/88. The results of the search will be stored in the document list MYLIST.