If your iSeries system has the interactive SQL utility available, you can use the STRSQL command and then type in SQL statements interactively. 
 
But if you don't have interactive SQL on your iSeries, RJS Software - as a courtesy - provides the DOCSQL command in the RJSIMAGE library to allow you to run SQL statements.
 

Available Fields in the Document Table DOCS00

  • TITLE 
  • FOLDER1
  • FOLDER2
  • FOLDER3
  • KEYWORD1
  • KEYWORD2
  • KEYWORD3
  • KEYWORD4
  • KEYWORD5
  • KEYWORD6
  • KEYWORD7
  • KEYWORD8
  • KEYWORD9
  • KEYWORD10
  • DOCTYPE2

Sample SQL Statements for Displaying Records in the DOCS00 Table

Example 1: To display all records in DOCS00, use:
 
DOCSQL SQLSTM('SELECT * FROM DOCS00')
 
Example 2: To display all records where the document title begins with TEST, use:
 
DOCSQL SQLSTM('SELECT * FROM DOCS00 WHERE TITLE LIKE "TEST*"')  
 
Example 3: To display all records where the document title is TEST, use:
 
DOCSQL SQLSTM('SELECT * FROM DOCS00 WHERE TITLE = "TEST"')  
 
Example 4: To display all records where the document title field contains the text string TEST, use:
 
DOCSQL SQLSTM('SELECT * FROM DOCS00 WHERE TITLE LIKE "*TEST*"')

Sample SQL Statements for Updating Fields in the Document Table

WARNING: Back up the RJSIMAGE library or the DOCS00 file prior to using SQL to update any fields in the WebDocs iSeries database. Improper use of SQL statements can inadvertently overwrite data.
 
Example 1: To change all records with TEST as search-key 10 to have TEST UPDATE as search-key 10 instead, use:
 
DOCSQL SQLSTM('UPDATE DOCS00 SET KEYWORD10 = "TEST UPDATE" where KEYWORD10 = "TEST"')                                                                 
 
Example 2: To change all records with TEST as search-key 10 to have TEST UPDATE as search-key 10 and YES as search-key 9, use:
 
DOCSQL SQLSTM('UPDATE DOCS00 SET KEYWORD10 = "TEST UPDATE",KEYWORD9 = "YES" where KEYWORD10 = "TEST"')                                              
 
Example 3: To change all records with BOB SMITH as the document title to have ROBERT SMITH as the document title, use:
 
DOCSQL SQLSTM('UPDATE DOCS00 SET TITLE = "ROBERT SMITH" where TITLE = "BOB SMITH"')                                                                 
Still have questions? We can help. Submit a case to technical support

Last Modified On:
You don't have the appropriate permissions.
No, open a new Support Case