Using SQL URL Searching with WebDocs iSeries Edition
From Support
As of V1.63 of WebDocs - iSeries Edition, SQL WHERE criteria can be passed in a URL SEARCH. Most all fields from the DOCS00 table can be entered when doing a URL SQL search
The following keywords are a subset of the fields in DOCS00 that can be passed with the WebDocs - iSeries Edition SQL URL string for searching:
Standard Document Search Fields
DOCID - Unique Document ID
DOCTYPE2 - Document Type
CHKDATE - Document Checkin Date (ISO format - 2005-04-11-10.51.03.000000)
TITLE - Search Title
KEYWORD1 - Search field 1
KEYWORD2 - Search field 2
KEYWORD3 - Search field 3
KEYWORD4 - Search field 4
KEYWORD5 - Search field 5
KEYWORD6 - Search field 6
KEYWORD7 - Search field 7
KEYWORD8 - Search field 8
KEYWORD9 - Search field 9
KEYWORD10 - Search field 10
AS/400 report Search Fields
DCSPOOL - Spool file name
DCDATE - Spool file date (ISO format - 2005-04-11-10.51.03.000000)
DCUSRDTA - Spool user data
DCUSERID - Spool user ID
DCFORM - Spool file form type
DCJOB - Spool file job name
DCOUTQ - Search output queue
DCUSRDFN - Search user defined data
ISO date string format: YYYY-MM-DD-HH-MM-SS-MILSEC
Format of search URL strings:
Beginning of search string (uses your AS/400 web server IP address)
http://1.1.1.1/imageserver/doc100r?action=Search&ISELECT=(KEYWORD1='123456')
SQL Selection Criteria &ISELECT=<SQL WHERE criteria. The WHERE is already implied>
Any valid field from DOCS00 can be used for searching.
Note: Document folder security is still observed and is automatically added to the search string before the search criteria is run.
SQL Comparison Examples
Equals
KEYWORD1='123456'
Starts With
KEYWORD1='123456%'
Contains the value somewhere in the string
KEYWORD1='%123456%'
Greater than or Equal
KEYWORD1>='123456'
Less than or Equal
KEYWORD1<='123456'
Greater than
KEYWORD1>'123456'
Less than
KEYWORD1<'123456'
Range
KEYWORD1>='123456' OR KEYWORD1<='999999'
URL Search Examples
Example search URL looking for all docs within the selected 24 hour period since ISO dates encompass the hour, minute and second.
http://1.1.1.1/imageserver/doc100r?action=Search&ISELECT=(CHKDATE>='2005-04-11-00.00.00.000000'%20AND%20CHKDATE<='2005-04-11-23.59.59.999999')
Example search URL looking for all docs within the selected 30 day period since ISO dates encompass the hour, minute and second.
http://1.1.1.1/imageserver/doc100r?action=Search&ISELECT=(CHKDATE>='2005-04-01-00.00.00.000000'%20AND%20CHKDATE<='2005-04-30-23.59.59.999999')
Example search URL looking for all docs where the TITLE is: 'User Guide' and KEYWORD1 = '123456'
http://1.1.1.1/imageserver/doc100r?action=Search&ISELECT=(TITLE='User Guide' AND KEYWORD1='123456')
Example search URL looking for all matching documents where the title starts with Jones.
http://1.1.1.1/imageserver/doc100r?action=Search&ISELECT=(TITLE LIKE 'Jones%')
Example search URL looking for all matching documents where the title equals Jones.
http://1.1.1.1/imageserver/doc100r?action=Search&ISELECT=(TITLE='Jones')
Example search URL looking for all matching documents where the first search key equals Jones or Johnson.
http://1.1.1.1/imageserver/doc100r?action=Search&ISELECT=(KEYWORD1='Jones' OR KEYWORD1='Johnson')
