Reorganizing documents and folders in WebDocs iSeries
September 15, 2010
Filed under: RJS Hacks, RJS Software
Tags: AS/400 - iSeries Sites, WebDocs, WebDocs iSeries
Comments: No Comments »
RJS Hacks is a weekly column presenting detailed tutorials for novice and seasoned administrators alike. Questions and comments are encouraged, and if you have a topic you would like to see discussed please let us know.
Do you find that the folder structure that seemed so simple and concise when you initially set up WebDocs iSeries has become a source of pain and confusion? Documents may be moved en masse, and folder hierarchies may be restructured after the fact, and using the example below we will walk through a sample restructuring. Let’s assume that your current folder structure is as poorly thought through as the example on the screen below.

With some input from the departments affected, you’ve sketched out an alternative. You will do away with the CLERK folder altogether and make ACCOUNTING the parent directory instead, with AP as the child directory inside. Afterwards, you will move all the documents from the old folder structure to the new all at once, instead of working with one at a time.
The instructions in this article assume that you have access to an iSeries user profile with *ALLOBJ special authority, and that your RJSIMAGE library is at version 3.08 or above. If you’re unsure which version you are at, enter the following command on a command line:
DSPDTAARA RJSIMAGE/VERSION
Because we’ll be working directly with the WebDocs database, make sure that no one is using or checking new documents into WebDocs before going any further. If you have additional concerns, please contact Technical Support.
Note: WebDocs’ folder structure is virtual, so this change will not affect where the actual .pdf or .tiff files appear on your filesystem. If you need to move the files on the IFS as well, please see Part II: Moving documents between IFS folders.
How do I discover how the documents are distributed through the current folder structure?
To see what you’re working with, run the following SQL statements to return how many documents exist in each folder:
RJSIMAGE/DOCSQL SQLSTM('select count(*) from rjsimage/docs00 where folder1=''CLERK''')
RJSIMAGE/DOCSQL SQLSTM('select count(*) from rjsimage/docs00 where folder1=''CLERK'' and folder2=''ACCOUNTING''')
RJSIMAGE/DOCSQL SQLSTM('select count(*) from rjsimage/docs00 where folder1=''CLERK'' and folder2=''AP''')
The first query returned for me with 0 results, so there are no documents actually residing in the CLERK folder. The other two have lots of documents, so those are what will need to move.
Creating the new folder structure
On the iSeries, navigate to Work with Document Folders:
ADDLIBLE RJSIMAGE
GO RJSIMAGE
Option 11: Work with Document Folders
You’ll need to create your new directories first. Use F6 to create a new folder.
Set the Folder to ACCOUNTING, the Description to Accounting Reports and keep the IFS Directory the same as the original folder entries. Upon save the Edit Document Folder screen will remain up so that you can create additional directories. Keep the Folder as ACCOUNTING but add AP to the line below. Set the Description to Accounts Payable and the IFS Directory as is. Save this new entry, and then F12 to return to the folder list, with your new folders now present (it may require an F5 to refresh the list).
Setting rights to the new folders
At this stage, it may help to have two 5250 sessions active, so that you can switch back and forth easily. On the one session, put a 9 on the old folders (CLERK/ACCOUNTING and CLERK/AP) to see their securities. On the second session, do the same for ACCOUNTING and ACCOUNTING/AP. Ensure that ACCOUNTING matches with CLERK/ACCOUNTING and ACCOUNTING/AP with CLERK/AP. We don’t want to surprise any users by denying them access to documents they were once able to work with.
Moving documents between WebDocs iSeries folders
You now have a folder to move your documents to. You may now run an SQL update statement to change the WebDocs folder for all documents in CLERK/ACCOUNTING and CLERK/AP to ACCOUNTING and ACCOUNTING/AP, respectively. Because you will be making changes in the WebDocs database, make a backup of the DOCS00 physical file before proceeding.
The first update command moves documents from CLERK/ACCOUNTING to ACCOUNTING:
RJSIMAGE/DOCSQL SQLSTM('update rjsimage/docs00 set FOLDER1 = ''ACCOUNTING'', FOLDER2 = '''' where FOLDER1 = ''CLERK'' and FOLDER2 = ''ACCOUNTING''')
The second moves documents from CLERK/AP to ACCOUNTING/AP:
RJSIMAGE/DOCSQL SQLSTM('update rjsimage/docs00 set FOLDER1 = ''ACCOUNTING'', FOLDER2 = ''AP'' where FOLDER1 = ''CLERK'' and FOLDER2 = ''AP''')
Congratulations, you’ve moved all the documents – in WebDocs at least. In truth, the actual files themselves are in the same IFS directories they always were, but the folders that are presented to your users in the web interface reflect the new structure and naming scheme.
Deleting the old folders
To tidy up, you may clear all securities from CLERK, CLERK/ACCOUNTING and CLERK/AP by returning to the folder menu in RJSIMAGE and using option 9 on each folder in turn. Clear all the Y’s out, and then use option 4 on the folders to delete them.

Displaying the changes to your users
Finally, you will need to purge your users’ old sessions – they will not see the new folders until their existing sessions are cleared. You can force sessions to reload using the DOCRMVSESU command:
DOCRMVSESU USER(*ALL)
When they log into the web interface now, they will now see the new folder structure:



On Facebook
On Twitter
On LinkedIn
Get Our Newsletter


