As of WebDocs iSeries version 1.63, you can pass SQL WHERE criteria in a URL SEARCH. You can enter most fields from the DOCS00 table in this URL SQL search.
Keywords
The following are the most common keywords in DOCS00 to pass with the WebDocs iSeries SQL URL string.
Standard Document Search Fields:
- DOCID - Unique document ID
- DOCTYPE2 - Document Type
- CHKDATE - Document check-in date (ISO format: YYYY-MM-DD-HH.MM.SS.MILSEC; for example: 2005-04-11-10.51.03.000000)
- TITLE - Document title
- KEYWORD1 - Search key 1
- KEYWORD2 - Search key 2
- KEYWORD3 - Search key 3
- KEYWORD4 - Search key 4
- KEYWORD5 - Search key 5
- KEYWORD6 - Search key 6
- KEYWORD7 - Search key 7
- KEYWORD8 - Search key 8
- KEYWORD9 - Search key 9
- KEYWORD10 - Search key 10
iSeries Report Search Fields:
- DCSPOOL - Spool file name
- DCDATE - Spool file date (ISO format: YYYY-MM-DD-HH.MM.SS.MILSEC; for example: 2005-04-11-10.51.03.000000)
- DCUSRDTA - Spool file user data
- DCUSERID - Spool file user ID
- DCFORM - Spool file form type
- DCJOB - Spool file job name
- DCOUTQ - Spool file output queue
- DCUSRDFN - Spool file user defined data
Formatting Search URL Strings
Use the following format, where 1.1.1.1 is your iSeries web server IP address:
http://1.1.1.1/imageserver/doc100r?action=Search&ISELECT=(KEYWORD1='123456')
Then, after &ISELECT=, type the SQL WHERE criteria, where the WHERE is already implied. You can use any valid field from DOCS00 for searching.
Note: Folder security is still observed and is automatically added to the search string before the search criteria is run.
Use the following SQL syntax:
- Equal to: KEYWORD1='123456'
- Starts with: KEYWORD1='123456%'
- Contains the value somewhere in the string: KEYWORD1='%123456%'
- Greater than or equal to: KEYWORD1>='123456'
- Less than or equal to: KEYWORD1<='123456'
- Greater than: KEYWORD1>'123456'
- Less than: KEYWORD1<'123456'
- Range: KEYWORD1>='123456' OR KEYWORD1<='999999'
URL Search Examples:
- Search URL for all documents within a selected 24-hour period:
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')
- Search URL for all documents within a selected 30-day period:
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')
- Search URL for all documents where the title is User Guide and search-key 1 is 123456:
http://1.1.1.1/imageserver/doc100r?action=Search&ISELECT=(TITLE='User Guide' AND KEYWORD1='123456')
- Search URL for all documents where the title starts with Jones:
http://1.1.1.1/imageserver/doc100r?action=Search&ISELECT=(TITLE LIKE 'Jones%')
- Search URL for all documents where the title is Jones:
http://1.1.1.1/imageserver/doc100r?action=Search&ISELECT=(TITLE='Jones')
- Search URL for all documents where the search-key 1 is either Jones or Johnson:
http://1.1.1.1/imageserver/doc100r?action=Search&ISELECT=(KEYWORD1='Jones' OR KEYWORD1='Johnson')