This article assumes:
- You have a current back-up of the RJSIMAGE library.
- You are familiar with SQL and know how WebDocs is being used in your organization.
Unlike the deleting search keys, folders, or Document Types, you often cannot directly delete a user from the user menu. Once a user has checked in a document, their user name is stored in DOCS00 as the user who checked in the document, and this prevents the user from being deleted directly from the user menu.
To delete this user, choose one of the following courses of action:
RJS Software recommends discussing user deletion with technical support before using the materials below.
SQL statements used to determine whether a WebDocs object is used
Use STRSQL or DOCSQL (in the RJSIMAGE library) to run the statements you need to run. STRSQL has the advantage of being promptable for column names, syntax, etc. However, some machines might not have it installed, so DOCSQL lets you execute SQL statements without requiring the licensed product.
Note: When you do use DOCSQL, you might want to use the command DSPFFD (Display File Field Description) to find what field names are in the file. STRSQL lets you prompt for these.
In each section, a question mark (?) is a placeholder for the value you want to investigate. The Folders section has more than 1 value to define a folder, so that is a little different ? details in that section. Keys are also a little different, so see that section for details.
Each statement names a file and its fields that could have the item in it ? this constitutes usage, generally. Keys are a little different ? see that section again for details.
When deleting items, one should first backup the file(s), then run the appropriate SELECT statement, to verify what is being deleted, and, finally, delete the items. You can simply replace SELECT * with DELETE in most, if not all cases.
Occasionally, the customer will want to empty out the fields ? this applies primarily to Keys.
For some items, deleting from the menu might still be blocked. An example is users, where the user is still referred to in a file like DOCS00 ? it should probably not be removed from there. So it will be necessary to use a statement to remove the base record for the item. That statement can be found at the end of each section.
Users
For |
SQL Statement |
Document User Groups |
SELECT * FROM DOCUGRP00 WHERE GUSER = ? OR GGROUP = ? |
Document Folder Security |
SELECT * FROM DOCSEC00 WHERE DUSER = ? |
Document Type User Access |
SELECT * FROM DOCTYPU00 WHERE DRUSER = ? |
Document Routing Definition Detail/Steps |
SELECT * FROM DOCFLOWD00 WHERE FDFLOWUSER = ?
SELECT * FROM DOCFLOWS00 WHERE FSUSER = ? OR FSUSERACC = ?
|
Document Users |
SELECT * FROM DOCUSR00 WHERE USERGROUP = ? |
Document User Predefined Filter Criteria |
SELECT * FROM DOCUSFLT00 WHERE FUSERNAM = ? |
Document Catalog |
SELECT * FROM DOCS00 WHERE CHKOUSER = ? OR CHKUSER = ? OR REVUSER = ? |
Document Versions |
SELECT * FROM DOCVER00 WHERE VERUSER = ? |
Document Notes/Annotations |
SELECT * FROM DOCNOT00 WHERE NUSER = ? |
Document Log File |
SELECT * FROM DOCLOG00 WHERE LUSER = ? |
Document Route Detail/Steps |
SELECT * FROM DOCFLOW00 WHERE FAPVUSER = ? OR FFLOWUSER = ? OR FORIGUSER = ? |
Document Session Table |
SELECT * FROM DOCSES00 WHERE SESSUSER = ? OR SGROUPUSER = ? OR SWORKFLOWU = ? |
Document Event File |
SELECT * FROM DOCEVENT WHERE EUSER = ? |
Document Users (DELETE) |
DELETE FROM DOCUSR00 WHERE USERNAM = ? |
Folders
Folder levels are defined by 5 values, so the question marks (?) are numbered here. Child folders are also checked, but only one of the statements shown here is used for a given folder. It depends on what is the first blank level.
For |
SQL Statement |
Document Folder Security |
SELECT * FROM DOCSEC00 WHERE DFOLDER1 = ?1 AND DFOLDER2 = ?2 AND DFOLDER3 = ?3 AND DFOLDER4 = ?4 AND DFOLDER5 = ?5
|
If level 2 is blank |
SELECT * FROM DOCSEC00 WHERE DFOLDER1 = ?1 AND DFOLDER2 <> ' '
|
If level 3 is blank |
SELECT * FROM DOCSEC00 WHERE DFOLDER1 = ?1 AND DFOLDER2 = ?2 AND DFOLDER3 <> ' '
|
If level 4 is blank |
SELECT * FROM DOCSEC00 WHERE DFOLDER1 = ?1 AND DFOLDER2 = ?2 AND DFOLDER3 = ?3 AND DFOLDER4 <> ' '
|
If level 5 is blank |
SELECT * FROM DOCSEC00 WHERE DFOLDER1 = ?1 AND DFOLDER2 = ?2 AND DFOLDER3 = ?3 AND DFOLDER4 = ?4 AND DFOLDER5 <> ' '
|
Document Session Table |
SELECT * FROM DOCSES00 WHERE SFOLDER1 = ?1 AND SFOLDER2 = ?2 AND SFOLDER3 = ?3 AND SFOLDER4 = ?4 AND SFOLDER5 = ?5
|
If level 2 is blank |
SELECT * FROM DOCSES00 WHERE SFOLDER1 = ?1 AND SFOLDER2 <> ' '
|
If level 3 is blank |
SELECT * FROM DOCSES00 WHERE SFOLDER1 = ?1 AND SFOLDER2 = ?2 AND SFOLDER3 <> ' '
|
If level 4 is blank |
SELECT * FROM DOCSES00 WHERE SFOLDER1 = ?1 AND SFOLDER2 = ?2 AND SFOLDER3 = ?3 AND SFOLDER4 <> ' '
|
If level 5 is blank |
SELECT * FROM DOCSES00 WHERE SFOLDER1 = ?1 AND SFOLDER2 = ?2 AND SFOLDER3 = ?3 AND SFOLDER4 = ?4 AND SFOLDER5 <> ' '
|
Document Catalog |
SELECT * FROM DOCS00 WHERE ( FOLDER1 = ?1 AND FOLDER2 = ?2 AND FOLDER3 = ?3 AND FOLDER4 = ?4 AND FOLDER5 = ?5 ) OR ( RFOLDER1 = ?1 AND RFOLDER2 = ?2 AND RFOLDER3 = ?3 AND RFOLDER4 = ?4 AND RFOLDER5 = ?5 )
|
If level 2 is blank |
SELECT * FROM DOCS00 WHERE ( FOLDER1 = ?1 AND FOLDER2 <> ' ' ) OR ( RFOLDER1 = ?1 AND RFOLDER2 <> ' ' )
|
If level 3 is blank |
SELECT * FROM DOCS00 WHERE ( FOLDER1 = ?1 AND FOLDER2 = ?2 AND FOLDER3 <> ' ' ) OR ( RFOLDER1 = ?1 AND RFOLDER2 = ?2 AND RFOLDER3 <> ' ' )
|
If level 4 is blank |
SELECT * FROM DOCS00 WHERE ( FOLDER1 = ?1 AND FOLDER2 = ?2 AND FOLDER3 = ?3 AND FOLDER4 <> ' ' ) OR ( RFOLDER1 = ?1 AND RFOLDER2 = ?2 AND RFOLDER3 = ?3 AND RFOLDER4 <> ' ' )
|
If level 5 is blank |
SELECT * FROM DOCS00 WHERE ( FOLDER1 = ?1 AND FOLDER2 = ?2 AND FOLDER3 = ?3 AND FOLDER4 = ?4 AND FOLDER5 <> ' ' ) OR ( RFOLDER1 = ?1 AND RFOLDER2 = ?2 AND RFOLDER3 = ?3 AND RFOLDER4 = ?4 AND RFOLDER5 <> ' ' )
|
Document Users
|
SELECT * FROM DOCUSR00 WHERE USERDFLR1 = ?1 AND USERDFLR2 = ?2 AND USERDFLR3 = ?3 AND USERDFLR4 = ?4 AND USERDFLR5 = ?
|
If level 2 is blank |
SELECT * FROM DOCUSR00 WHERE USERDFLR1 = ?1 AND USERDFLR2 <> ' '
|
If level 3 is blank |
SELECT * FROM DOCUSR00 WHERE USERDFLR1 = ?1 AND USERDFLR2 = ?2 AND USERDFLR3 <> ' '
|
If level 4 is blank |
SELECT * FROM DOCUSR00 WHERE USERDFLR1 = ?1 AND USERDFLR2 = ?2 AND USERDFLR3 = ?3 AND USERDFLR4 <> ' '
|
If level 5 is blank |
SELECT * FROM DOCUSR00 WHERE USERDFLR1 = ?1 AND USERDFLR2 = ?2 AND USERDFLR3 = ?3 AND USERDFLR4 = ?4 AND USERDFLR5 <> ' '
|
Select Folders |
|
If level 2 is blank |
SELECT * FROM DOCFLR00 WHERE DOCFLR1 = ?1 AND DOCFLR2 <> ' '
|
If level 3 is blank |
SELECT * FROM DOCFLR00 WHERE DOCFLR1 = ?1 AND DOCFLR2 = ?2 AND DOCFLR3 <> ' '
|
If level 4 is blank |
SELECT * FROM DOCFLR00 WHERE DOCFLR1 = ?1 AND DOCFLR2 = ?2 AND DOCFLR3 = ?3 AND DOCFLR4 <> ' '
|
If level 5 is blank |
SELECT * FROM DOCFLR00 WHERE DOCFLR1 = ?1 AND DOCFLR2 = ?2 AND DOCFLR3 = ?3 AND DOCFLR4 = ?4 AND DOCFLR5 <> ' '
|
Document Folders (DELETE) |
DELETE FROM DOCFLR00 WHERE DOCFLR1 = ?1 AND DOCFLR2 = ?2 AND DOCFLR3 = ?3 AND DOCFLR4 = ?4 AND DOCFLR5 = ?5
|
Keys
Keys can be found in 2 different contexts. In the look-up context, the internal name will be found in the 2 look-up files. The number varies, depending on which key you are looking at. In the Catalog and Linked Indexes, the respective key field needs to be empty to let the key be deleted.
For |
SQL Statement |
Document Lookup Pulldown Fields |
SELECT * FROM DOCL00 WHERE LDOCTYPE = ? AND LKEYVAL = 'USERKEY[1-10]' |
Document Custom Lookup Pulldown SQL |
SELECT * FROM DOCLS00 WHERE LSDOCTYPE = ? AND LSKEYVAL = 'USERKEY[1-10]' |
Document Catalog |
SELECT * FROM DOCS00 WHERE DOCTYPE2 = ? AND KEYWORD[1-10] <> ' ' |
Document Linked Indexes |
SELECT * FROM DOCLINK00 WHERE LDOCTYPE2 = ? AND LKEYWORD[1-10] <> ' ' |
Document Settings (DELETE) |
DELETE FROM DOCKEY00 WHERE KEYTYPE = ? AND KEYVAL = USERKEY[1-10] |
Document Types
For |
SQL Statement |
Document Settings |
SELECT * FROM DOCKEY00 WHERE KEYTYPE = ? |
Document Type User Access |
SELECT * FROM DOCTYPU00 WHERE DRTYPE = ? |
Document Lookup Pulldown Fields |
SELECT * FROM DOCL00 WHERE LDOCTYPE = ? |
Document Custom Lookup Pulldown SQL |
SELECT * FROM DOCLS00 WHERE LSDOCTYPE = ? |
Document Users |
SELECT * FROM DOCUSR00 WHERE USERDTYPE = ? |
Document Catalog |
SELECT * FROM DOCS00 WHERE DOCTYPE2 = ? |
Document Linked Indexes |
SELECT * FROM DOCLINK00 WHERE LDOCTYPE2 = ? |
Document Session Table |
SELECT * FROM DOCSES00 WHERE SESDOCTYP = ? |
Document Type (DELETE) |
DELETE FROM DOCTYPE00 WHERE DCTYPE = ? |