Renaming Standalone WPS-PLUS Users OA019 Fall '90 Symposium Charles McMichael Pittsburgh Corning Corporation 800 Presque Isle Drive Pittsburgh, PA 15239 Table of Contents TASK #1A -- Set up a template for WPS-PLUS users' accounts TASK #1B -- Set up a user's account from a template TASK #2 -- Set up a WPS-PLUS files in a user's account TASK #3 -- Move a user from one disk to another TASK #4 -- Change a WPS-PLUS user's name TASK #5 -- Move a number of documents between WPS-PLUS users APPENDIX A: Warnings and Notes APPENDIX B: Differences between WPS-PLUS v2.1 and v3.1 APPENDIX C: XFR.COM CONVENTIONS: UNDERLINED denotes operator input   denotes operator input that the terminal won't echo Bold is used to draw your attention to an item . denotes the output has been abridged to save : space in the session notes WPS-PLUS is a trademark of Digital Equipment Corporation TASK #1A -- Set up a template for WPS-PLUS users' accounts Username: SYSTEM Password:   Welcome to VAX/VMS version V5.1-1 on node PCCVAX Last interactive login on Monday, 15-OCT-1990 11:12 Last non-interactive login on Monday, 15-OCT-1990 14:39 $ SET DEF SYS$SYSTEM $ MCR AUTHORIZE UAF> SHOW DEFAULT Username: DEFAULT Owner: Account: UIC: [200,200] ([DEFAULT]) CLI: DCL Tables: DCLTABLES Default: [USER] LGICMD: Login Flags: Primary days: Mon Tue Wed Thu Fri Secondary days: Sat Sun No access restrictions Expiration: (none) Pwdminimum: 6 Login Fails: 0 Pwdlifetime: (none) Pwdchange: (none) Last Login: (none) (interactive), (none) (non-interactive) Maxjobs: 0 Fillm: 20 Bytlm: 8192 Maxacctjobs: 0 Shrfillm: 0 Pbytlm: 0 Maxdetach: 0 BIOlm: 18 JTquota: 1024 Prclm: 2 DIOlm: 18 WSdef: 150 Prio: 4 ASTlm: 24 WSquo: 256 Queprio: 4 TQElm: 10 WSextent: 512 CPU: (none) Enqlm: 100 Pgflquo: 10240 Authorized Privileges: TMPMBX NETMBX Default Privileges: TMPMBX NETMBX UAF> SHOW/BR [*,*] Owner Username UIC Account Privs Pri Directory SYSTEM MANAGER SYSTEM [1,4] SYSTEM All 4 SYS$SYSROOT:[SYSMGR] FIELD SERVICE FIELD [1,10] FIELD All 4 SYS$SYSROOT:[SYSMAINT] DEFAULT [200,200] Normal 4 SYS$SYSDEVICE:[USER] CHARLES MCMICHAEL MCMICHAEL [400,402] EDP All 4 DUA0:[MCMICHAEL] UAF> ADD WPSUSER/PASS=WPSV31/UIC=[200,201] %UAF-I-ADDMSG, user record successfully added %UAF-I-RDBADDMSGU, identifier WPSUSER value: [000200,000201] added to RIGHTSLIST.DAT UAF> SHOW WPSUSER Username: WPSUSER Owner: Account: UIC: [200,201] ([WPSUSER]) CLI: DCL Tables: DCLTABLES Default: SYS$SYSDEVICE:[USER] LGICMD: LOGIN . : Default Privileges: TMPMBX NETMBX UAF> MOD WPSUSER/FLAG=DISUSER %UAF-I-MDFYMSG, user record(s) updated UAF> MOD WPSUSER/ASTLM=100/BIOLM=50/BYTLM=36500/DIOLM=50/ENQLM=200 %UAF-I-MDFYMSG, user record(s) updated UAF> MOD WPSUSER/FILLM=150/PGFLQUO=20000/PRCLM=6/TQELM=50 %UAF-I-MDFYMSG, user record(s) updated UAF> MOD WPSUSER/WSDEF=256/WSEXTENT=2048/WSQUO=512 %UAF-I-MDFYMSG, user record(s) updated UAF> SHOW WPSUSER Username: WPSUSER Owner: Account: UIC: [200,201] ([WPSUSER]) CLI: DCL Tables: DCLTABLES Default: SYS$SYSDEVICE:[USER] LGICMD: LOGIN Login Flags: Disuser Primary days: Mon Tue Wed Thu Fri Secondary days: Sat Sun No access restrictions Expiration: (none) Pwdminimum: 6 Login Fails: 0 Pwdlifetime: (none) Pwdchange: (pre-expired) Last Login: (none) (interactive), (none) (non-interactive) Maxjobs: 0 Fillm: 150 Bytlm: 36500 Maxacctjobs: 0 Shrfillm: 0 Pbytlm: 0 Maxdetach: 0 BIOlm: 50 JTquota: 1024 Prclm: 6 DIOlm: 50 WSdef: 256 Prio: 4 ASTlm: 100 WSquo: 512 Queprio: 4 TQElm: 50 WSextent: 2048 CPU: (none) Enqlm: 200 Pgflquo: 20000 Authorized Privileges: TMPMBX NETMBX Default Privileges: TMPMBX NETMBX UAF> EXIT %UAF-I-DONEMSG, system authorization file modified %UAF-I-NAFNOMODS, no modifications made to network authorization file %UAF-I-RDBDONEMSG, rights database modified $ LO SYSTEM logged out at 15-OCT-1990 15:22:31.70 TASK #1B -- Set up a user's account from a template Username: SYSTEM Password:   Welcome to VAX/VMS version V5.1-1 on node PCCVAX Last interactive login on Monday, 15-OCT-1990 15:12 Last non-interactive login on Monday, 15-OCT-1990 14:39 $ SET DEF SYS$SYSTEM $ MCR AUTHORIZE UAF> SHOW [*,404]/BR Owner Username UIC Account Privs Pri Directory DEFAULT [200,200] Normal 4 [USER] UAF> COPY WPSUSER BRUNNER/PASS=COLT45/UIC=[400,404]/ACCOUNT=EDP %UAF-I-COPMSG, user record copied %UAF-I-RDBADDMSGU, identifier BRUNNER value: [000400,000404] added to RIGHTSLIST.DAT UAF> MOD BRUNNER/DEVICE=DJA3:/DIRECTORY=[BRUNNER]/OWNER="KIM BRUNNER" %UAF-I-MDFYMSG, user record(s) updated UAF> MOD BRUNNER/FLAG=NODISUSER %UAF-I-MDFYMSG, user record(s) updated UAF> SHOW BRUNNER Username: BRUNNER Owner: KIM BRUNNER Account: EDP UIC: [400,404] ([EDP,BRUNNER]) CLI: DCL Tables: DCLTABLES Default: DJA3:[BRUNNER] LGICMD: Login Flags: Primary days: Mon Tue Wed Thu Fri Secondary days: Sat Sun No access restrictions Expiration: (none) Pwdminimum: 6 Login Fails: 0 Pwdlifetime: (none) Pwdchange: 15-OCT-1990 15:16 Last Login: (none) (interactive), (none) (non-interactive) Maxjobs: 0 Fillm: 150 Bytlm: 36500 Maxacctjobs: 0 Shrfillm: 0 Pbytlm: 0 Maxdetach: 0 BIOlm: 50 JTquota: 1024 Prclm: 6 DIOlm: 50 WSdef: 256 Prio: 4 ASTlm: 100 WSquo: 512 Queprio: 4 TQElm: 50 WSextent: 2048 CPU: (none) Enqlm: 200 Pgflquo: 20000 Authorized Privileges: TMPMBX NETMBX Default Privileges: TMPMBX NETMBX UAF> EXIT %UAF-I-DONEMSG, system authorization file modified %UAF-I-NAFNOMODS, no modifications made to network authorization file %UAF-I-RDBDONEMSG, rights database modified $ CREATE/DIR/OWNER=BRUNNER/LOG DJA3:[BRUNNER] %CREATE-I-CREATED, DJA3:[BRUNNER] created $ DIR/OWNER DJA3:[0,0]BRUNNER Directory DJA3:[000,000] BRUNNER.DIR;1 [EDP,BRUNNER]  Total of 1 file. $ LO SYSTEM logged out at 15-OCT-1990 15:31:07.22 TASK #2 -- Set up WPS-PLUS files in a user's account Username: SYSTEM Password:   Welcome to VAX/VMS version V5.1-1 on node PCCVAX Last interactive login on Friday, 19-OCT-1990 16:04 Last non-interactive login on Friday, 19-OCT-1990 15:45 $ @WPSPLUS$SYSTEM:WPLNEWUSR Users SYS$LOGIN [SYS$COMMON:[SYSMGR]]: DJA3:[BRUNNER] Creating a WPSPLUS directory... Creating REQUIRED sub-directories... Creating REQUIRED default .DAT files.... Creating REQUIRED user profile... Setup Completed for user: DJA3:[BRUNNER] Do you wish to enter another user (Y/N)? N $!if DOCDB.DAT is owned by the user, we can skip the next 3 SET FILE commands $ DIR DJA3:[BRUNNER.WPSPLUS]DOCDB.DAT/OWNER Directory DJA3:[BRUNNER.WPSPLUS] DOCDB.DAT;1 [1,1] Total of 1 file. $ SET FILE/OWNER=BRUNNER DJA3:[0,0]BRUNNER.DIR/LOG %SET-I-MODIFIED, DJA3:[000,000]BRUNNER.DIR;1 modified $ SET FILE/OWNER=PARENT DJA3:[BRUNNER]WPSPLUS.DIR/LOG %SET-I-MODIFIED, DJA3:[BRUNNER]WPSPLUS.DIR;1 modified $ SET FILE/OWNER=PARENT DJA3:[BRUNNER.WPSPLUS...]*.*;* $ DIR DJA3:[BRUNNER.WPSPLUS]DOCDB.DAT/OWNER Directory DJA3:[BRUNNER.WPSPLUS] DOCDB.DAT;1 [EDP,BRUNNER]  Total of 1 file. $ LO SYSTEM logged out at 19-OCT-1990 16:30:22.53 TASK #3 -- Move a user from one disk to another (WARNING: A WPS-PLUS v2 user must delete the personal dictionary and empty the wastebasket before you attempt this.) Username: SYSTEM Password:   Welcome to VAX/VMS version V5.1-1 on node PCCVAX Last interactive login on Friday, 19-OCT-1990 16:40 Last non-interactive login on Friday, 19-OCT-1990 15:45 $ SET DEF SYS$SYSTEM $ MCR AUTHORIZE UAF> SHOW BRUNNER Username: BRUNNER Owner: KIM BRUNNER Account: EDP UIC: [400,404] ([EDP,BRUNNER]) CLI: DCL Tables: DCLTABLES Default:  DJA3:[BRUNNER] LGICMD: LOGIN . : Default Privileges: TMPMBX NETMBX UAF> EXIT %UAF-I-NOMODS, no modifications made to system authorization file %UAF-I-NAFNOMODS, no modifications made to network authorization file %UAF-I-RDBNOMODS, no modifications made to rights database $ DIR/OWNER DJA3:[0,0]BRUNNER Directory DJA3:[000,000] BRUNNER.DIR;1 [EDP,BRUNNER]  Total of 1 file. $ DIRECTORY/GRAND/SIZE=ALL DJA3:[BRUNNER...] Grand total of 12 directories, 192 files, 2188/2436 blocks. $ SHOW DEVICE DJA2: Device Device Error Volume  Free Trans Mnt Name Status Count Label Blocks Count Cnt PCCVAX$DJA2: Mounted 0 DISK2 312420 2 1 $ MCR AUTHORIZE UAF> MOD BRUNNER/DEVICE=DJA2: %UAF-I-MDFYMSG, user record(s) updated UAF> SHOW BRUNNER Username: BRUNNER Owner: KIM BRUNNER Account: EDP UIC: [400,404] ([EDP,BRUNNER]) CLI: DCL Tables: DCLTABLES Default: DJA2:[BRUNNER] LGICMD: LOGIN . : Default Privileges: TMPMBX NETMBX UAF> EXIT %UAF-I-DONEMSG, system authorization file modified %UAF-I-NAFNOMODS, no modifications made to network authorization file %UAF-I-RDBNOMODS, no modifications made to rights database $ BACKUP/VERIFY DJA3:[BRUNNER...] DJA2:[BRUNNER...]/OWNER=ORIGINAL $ DIR/OWNER DJA2:[0,0]BRUNNER Directory DJA2:[000,000] BRUNNER.DIR;1 [EDP,BRUNNER]  Total of 1 file. $ DIRECTORY/GRAND/SIZE=ALL DJA2:[BRUNNER...] Grand total of 12 directories, 192 files, 2188/2436 blocks. $ LO SYSTEM logged out at 19-OCT-1990 17:19:24.87 TASK #4 -- Change a WPS-PLUS user's name (WARNING: A WPS-PLUS v2 user must delete the personal dictionary and empty the wastebasket before you attempt this.) Username: SYSTEM Password:   Welcome to VAX/VMS version V5.1-1 on node PCCVAX Last interactive login on Friday, 19-OCT-1990 17:14 Last non-interactive login on Friday, 19-OCT-1990 15:45 $ SET DEFAULT SYS$SYSTEM $ MCR AUTHORIZE UAF> SHOW SEDLACEK Username: SEDLACEK Owner: KIM SEDLACEK Account: EDP UIC: [400,404] ([EDP,SEDLACEK]) CLI: DCL Tables: DCLTABLES Default: DJA2:[SEDLACEK] LGICMD: LOGIN Login Flags: Primary days: Mon Tue Wed Thu Fri Secondary days: Sat Sun No access restrictions Expiration: (none) Pwdminimum: 4 Login Fails: 0 Pwdlifetime: 120 00:00 Pwdchange: 15-OCT-1990 15:16  . : Default Privileges: TMPMBX NETMBX UAF> EXIT %UAF-I-NOMODS, no modifications made to system authorization file %UAF-I-NAFNOMODS, no modifications made to network authorization file %UAF-I-RDBNOMODS, no modifications made to rights database $ DIRECTORY/GRAND/SIZE=ALL DJA2:[SEDLACEK...] Grand total of 39 directories, 1092 files, 37292/38658 blocks. $ SHOW DEVICE SYS$SYSTEM Device Device Error Volume  Free Trans Mnt Name Status Count Label Blocks Count Cnt GOPRO2$DUA0: Mounted 0 VMSRL5 212420 259 1 $ BACKUP DJA2:[SEDLACEK...] SEDLACEK.BCK/SAVESET/VERIFY %BACKUP-I-STARTVERIFY, starting verification pass $ DIR/SIZE=ALL SEDLACEK.BCK Directory SYS$SYSROOT:[SYSEXE] SEDLACEK.BCK;1 42462/42462 Total of 1 file, 42462/42462 blocks. $ RENAME DJA2:[000000]SEDLACEK.DIR STAATS/LOG %RENAME-I-RENAMED, DJA2:[000000]SEDLACEK.DIR;1 renamed to DJA2:[000000]STAATS.DIR;1 $ MCR AUTHORIZE UAF> RENAME SEDLACEK STAATS/PASSWORD=COLT46 %UAF-I-RENMSG, user record renamed %UAF-I-RDBMDFYMSG, identifier SEDLACEK modified UAF> MODIFY STAATS/DIRECTORY=[STAATS] %UAF-I-MDFYMSG, user record(s) updated UAF> MODIFY STAATS/OWNER="KIM STAATS" %UAF-I-MDFYMSG, user record(s) updated UAF> MODIFY STAATS/PWDEXPIRED %UAF-I-MDFYMSG, user record(s) updated UAF> SHOW STAATS Username: STAATS Owner: KIM STAATS Account: EDP  UIC: [400,404] ([EDP,STAATS]) CLI: DCL Tables: DCLTABLES Default: DJA2:[STAATS] LGICMD: LOGIN Login Flags: Primary days: Mon Tue Wed Thu Fri Secondary days: Sat Sun No access restrictions Expiration: (none) Pwdminimum: 4 Login Fails: 0 Pwdlifetime: 120 00:00 Pwdchange: (pre-expired)  . : Default Privileges: TMPMBX NETMBX UAF> EXIT %UAF-I-DONEMSG, system authorization file modified %UAF-I-NAFNOMODS, no modifications made to network authorization file %UAF-I-RDBDONEMSG, rights database modified $ RENAME DJA2:[STAATS.WPSPLUS]SEDLACEK.PST STAATS/LOG %RENAME-I-RENAMED, DJA2:[STAATS.WPSPLUS]SEDLACEK.PST;1 renamed to DJA2:[STAATS.WPSPLUS]STAATS.PST;1 $ MAIL MAIL> SHOW FORWARD/USER=SEDLACEK SEDLACEK has not set a forwarding address MAIL> SET FORWARD/USER=SEDLACEK STAATS MAIL> SHOW FORWARD/USER=SEDLACEK SEDLACEK has mail forwarded to STAATS MAIL> EXIT $ LO SYSTEM logged out at 19-OCT-1990 17:24:19.87 TASK #5 -- Move a number of documents between WPS-PLUS users PREREQUISITES: 1) You've created the file WPSPLUS$SYSTEM:XFR.COM (see Appendix C) 2) You know each users default device and directory 3) The donor has put some documents into one or more folders whose names begin with "XFR". WPS-PLUS commands that will do this include RFD,XFD,MCD,RFF,XFF, and MCF. 4) The recipient doesn't have a folder whose name matches one of the folders mentioned in prerequisite 3). The script you'll make expects to answer a question that won't be asked if the folder already exists, and that would throw the succeeding answers out of sync. 5) Neither user is running WPS-PLUS at the moment Username: SYSTEM Password:   Welcome to VAX/VMS version V5.1-1 on node GOPRO2 Last interactive login on Friday, 19-OCT-1990 18:51 Last non-interactive login on Friday, 19-OCT-1990 17:06 $ @WPSPLUS$SYSTEM:XFR THIS PROCEDURE COPIES DOCUMENTS BETWEEN WPS-PLUS ACCOUNTS ENTER DEVICE:[DIRECTORY] OF THE DONOR > DUA0:[MCMICHAEL] ENTER DEVICE:[DIRECTORY] OF THE RECIPIENT> DJA2:[STAATS] 3 DOCUMENTS TO TRANSFER FORM Word and Document Processing Current Folder [MEMOS]> Current Title [FILE 2]> Current Number [001017]> Date [19-Oct-1990 18:11]> . : SYSTEM finished using WPS-PLUS at 19-Oct-1990 18:56 TRANSFER DONE $ LO SYSTEM logged out at 19-OCT-1990 18:57:02.27 FOLLOW-UP: 1) The recipient should confirm that the documents arrived intact. 2) Only then should the donor dispose of the folders made to fulfill prerequisite 3). WPS-PLUS commands that will do this include D,RFD,DF, and RFF. APPENDIX A: Warnings and Notes =============================================================================== Warning #1: If you do not set your default to SYS$SYSTEM, you will get an error message and an offer to make a new file. Refuse the offer. Set your default to the proper directory. Here's an example: $ SET DEFAULT SYS$SSSSSSYSTEM $ MCR AUTHORIZE %UAF-E-NAOFIL, unable to open SYSUAF.DAT -RMS-E-FNF, file not found Do you want to create a new file? N $ SET DEFAULT SYS$SYSTEM $ MCR AUTHORIZE UAF> ------------------------------------------------------------------------------- Warning #2: The command qualifier /OWNER=PARENT instructs the computer to assign the file's ownership to the owner of the directory holding the file. If you actually have an account named PARENT, this can cause a great deal of confusion. A similar situation occurs with the qualifier /OWNER=ORIGINAL. ------------------------------------------------------------------------------- Warning #3: After installing WPS-PLUS v2.1, you must also do $ COPY SYS$HELP:WPSPLU021.RELEASE_NOTES WPSPLUS$SYSTEM:WPLRELNOT.TXT/PROT=WO:RE This will prevent a problem with [WPSPLUS.LIB]RELNOTES.SCP trying to move a nonexistent file whenever you run WPSPLUS$SYSTEM:WPLNEWUSR.COM. ------------------------------------------------------------------------------- Warning #4: In WPS-PLUS v3.0, a user whose DEFAULT PRIVILEGES are different from his AUTHORIZED PRIVILEGES may not be able to run WPS-PLUS. One workaround is to use the AUTHORIZE utility and equalize the user's privileges. ------------------------------------------------------------------------------- Warning #5: After upgrading from WPS-PLUS v2 to v3, make all the WPS-PLUS users spellcheck at least one word from one document. This triggers the conversion of their personal dictionaries, which removes the v2 restrictions on renaming users or swapping disks. After a users successfully converts the personal dictionary, the system manager may delete the file PERSONAL.LGP residing in the users default directory (*not* the one in the [.DOC0] subdirectory). =============================================================================== Note #1: The command MCR AUTHORIZE is just shorthand for RUN SYS$SYSTEM:AUTHORIZE. ------------------------------------------------------------------------------- Note #2: For more information on F$EXTRACT, F$FAO, and F$SEARCH, type $ HELP LEXICALS or look under "Lexical Functions" in the DCL Dictionary. ------------------------------------------------------------------------------- Note #3: If you use the /PWDEXPIRED switch in AUTHORIZE, the next time the user logs in, there will be a message like this: Username: STAATS Password:   Welcome to VAX/VMS version V5.1-1 on node GOPRO2 Last interactive login on Monday, 24-SEP-1990 08:47 Last non-interactive login on Thursday, 12-APR-1990 09:56 Your password has expired; you must set a new password to log in Old password:  New password:  Verification:  ------------------------------------------------------------------------------- Note #4: If you're feeling adventurous, you can speed up the login procedure and keep from scaring users who log onto hardcopy terminals by doing the following steps: 1) Log in under the SYSTEM account 2) Copy WPSPLUS_LOGIN.COM to WPSPLUS_LOGIN.ORIGINAL 3) Edit WPSPLUS_LOGIN.COM to make the SET TERMINAL command run only when needed DISCLAIMER: This isn't foolproof. But I've never had trouble with it. In file SYS$COMMON:[SYSMGR]WPSPLUS_LOGIN.ORIGINAL (before) $ SET TERMINAL/INQUIRE ! Set up default characteristics to test $ TERM_TYPE := 'f$getdvi("tt:","devtype") ! Find out type of terminal . : $ WRITE sys$output "Unrecognized Terminal, please see your System Manager." In file SYS$COMMON:[SYSMGR]WPSPLUS_LOGIN.COM (after) $!! SET TERMINAL/INQUIRE ! Set up default characteristics to test $ TERM_TYPE := 'f$getdvi("tt:","devtype") ! Find out type of terminal $ IF TERM_TYPE .EQ. 0 THEN SET TERMINAL/INQUIRE $ IF TERM_TYPE .EQ. 0 THEN TERM_TYPE := 'f$getdvi("tt:","devtype") . : $!! WRITE sys$output "Unrecognized Terminal, please see your System Manager." $ WRITE sys$output "WPS won't run on this terminal, please see the System Mgr" APPENDIX B: Differences between WPS-PLUS v2.1 and v3.1 =============================================================================== Here is a comparison of the directory structures for a WPS-PLUS user. WPSPLUS$SYSTEM:WPLNEWUSR.COM was run. The user logged in, activated WPS-PLUS, and spellchecked and refiled the release notes. Under v2.1 Under v3.1 DJA3:[BRUNNER]BRUNNER.PST DJA3:[BRUNNER]PERSONAL.LGP DJA3:[BRUNNER]WPSPLUS.DIR DJA3:[BRUNNER]WPSPLUS.DIR DJA3:[...WPSPLUS]BRUNNER.PST DJA3:[...WPSPLUS]BRUNNER.PST DJA3:[...WPSPLUS]DAF.DAT DJA3:[...WPSPLUS]DAF.DAT DJA3:[...WPSPLUS]DOC0.DIR DJA3:[...WPSPLUS]DOC0.DIR DJA3:[...WPSPLUS]DOC1.DIR DJA3:[...WPSPLUS]DOC1.DIR DJA3:[...WPSPLUS]DOC2.DIR DJA3:[...WPSPLUS]DOC2.DIR DJA3:[...WPSPLUS]DOC3.DIR DJA3:[...WPSPLUS]DOC3.DIR DJA3:[...WPSPLUS]DOC4.DIR DJA3:[...WPSPLUS]DOC4.DIR DJA3:[...WPSPLUS]DOC5.DIR DJA3:[...WPSPLUS]DOC5.DIR DJA3:[...WPSPLUS]DOC6.DIR DJA3:[...WPSPLUS]DOC6.DIR DJA3:[...WPSPLUS]DOC7.DIR DJA3:[...WPSPLUS]DOC7.DIR DJA3:[...WPSPLUS]DOC8.DIR DJA3:[...WPSPLUS]DOC8.DIR DJA3:[...WPSPLUS]DOC9.DIR DJA3:[...WPSPLUS]DOC9.DIR DJA3:[...WPSPLUS]DOCDB.DIR DJA3:[...WPSPLUS]DOCDB.DIR DJA3:[...WPSPLUS]UDP.DAT DJA3:[...WPSPLUS]UDP.DAT DJA3:[...WPSPLUS]WPL_DICTS.DAT DJA3:[...WPSPLUS]WPL_LANGS.DAT DJA3:[...WPSPLUS]WPSDEF.DAT DJA3:[...WPSPLUS]WPSDEF.DAT DJA3:[...WPSPLUS.DOC0]GLOBAL.LGP DJA3:[...WPSPLUS.DOC0]PERSONAL.LGP DJA3:[...WPSPLUS.DOC1]ZTHCBATIB.TXT DJA3:[...WPSPLUS.DOC1]ZTHDJ05QI.TXT (3 directories, 20 files) (4 directories, 22 files) ------------------------------------------------------------------------------ Here is an illustration of how document and dictionary filenames are stored in DOCDB.DAT and DAF.DAT. This explains the reason behind the v2 restrictions on renaming users or swapping disks. Under v2.1 Under v3.1 "[.DOC1]ZTHHBFBOV.WPL" "[.DOC1]ZTHHBFBOV.WPL" "DJA3:[BRUNNER]PERSONAL.LGP" "[.DOC0]PERSONAL.LGP" ------------------------------------------------------------------------------- Under v2.1 Under v3.1 Title length: 70 characters max. Title length: 72 characters max. APPENDIX C: XFR.COM =============================================================================== Enter this command procedure into the directory WPSPLUS$SYSTEM: for use in moving groups of documents between users. It has been tested for WPS-PLUS versions 2.1 and 3.1 under VMS v5.1-1. I have tried to avoid commands that do not exist in VMS v4 (such as DCL IF-THEN-ELSE) because the Software Product Description for WPS-PLUS/VMS claims it runs under VMS v4.6 and above. This software is provided "AS IS." $! XFR.COM $! This command procedure copies WPS-PLUS documents between accounts. $! It copies documents from folders whose labels begin with "XFR". $! $! While you are using this command procedure, make sure: $! o the users in question are not running WPS-PLUS $! o you are the only one currently running this command procedure $! o you have enough privileges to do the job (the SYSTEM account does) $! $! THIS PROCEDURE SORTS DOCDB.DAT (500 bytes) $! Bytes 0 thru 35 DOCUMENT (KEY#0) (bytes 0 thru 29 list the WPS folder) $! (bytes 30 thru 35 echo KEY#1) $! 36 41 DOCNUM (KEY#1) (equals 1,000,000 minus NUMBER) $! 42 47 TITLE_HASH (KEY#2) (echoes bytes 113 thru 118) $! 48 111 FILENAME (VMS file name for document) $! 113 184 TITLE (WPS document title) $! 260 309 KEYWORDS (WPS keywords) $! 382 387 NUMBER (WPS document number) $! (KEY#0 has a unique value for each record in the file) $! (KEY#1 & KEY#2 permit duplicate values) $! $! Begin $! $ ON WARNING THEN GOTO LABEL_ABNORMAL $ ON CONTROL_Y THEN GOTO LABEL_ABNORMAL $! $ WPS_VERSION = 3 !if the recipient is running WPS-PLUS version 2.1 $ !then edit the line to say WPS_VERSION = 2 $! $ NUMXFR = 0 !counter of successful transfers $ CROSSFILED = 0 !initialized as FALSE $ NEED_NEW_FOLDER = 0 !initialized as FALSE $ PRIOR_FOLDER = "" !initialized as null $ PRIOR_DOCNUM = "" !initialized as null $ DUMMY_TITLE = "XFR Placeholder File" !used when creating new folders $! $ CR = "{cr}" !Symbols to be used $ TAB = "{tab}" !in a WPS-PLUS script. $ BSLF = "{bs}{lf}" !Note that the symbols $ GOLD_F = "{gold f}" !contain braces (curly brackets) $! $! Request the necessary information $! $ WRITE SYS$OUTPUT " " $ WRITE SYS$OUTPUT "THIS PROCEDURE COPIES DOCUMENTS BETWEEN WPS-PLUS ACCOUNTS" $ WRITE SYS$OUTPUT " " $ READ/PROMPT="ENTER DEVICE:[DIRECTORY] OF THE DONOR > " SYS$COMMAND OLDDIR $ READ/PROMPT="ENTER DEVICE:[DIRECTORY] OF THE RECIPIENT> " SYS$COMMAND NEWDIR $! $! Check that the DOCDB.DAT files exist where the operator said $! $ OLDDIR = OLDDIR - "]" + ".WPSPLUS]" !point the symbol to the WPS subdirectory $ NEWDIR = NEWDIR - "]" + ".WPSPLUS]" !point the symbol to the WPS subdirectory $ OLDDOCDB = F$SEARCH("''OLDDIR'DOCDB.DAT") !look for the file $ NEWDOCDB = F$SEARCH("''NEWDIR'DOCDB.DAT") !look for the file $ IF (OLDDOCDB .EQS. "") THEN WRITE SYS$OUTPUT "''OLDDIR'DOCDB.DAT NOT FOUND" $ IF (NEWDOCDB .EQS. "") THEN WRITE SYS$OUTPUT "''NEWDIR'DOCDB.DAT NOT FOUND" $ IF (OLDDOCDB .EQS. "" .OR. NEWDOCDB .EQS. "") THEN GOTO LABEL_END $! $! Do a sort on the old user's DOCDB.DAT $! $ SORT/SPEC=SYS$INPUT 'OLDDOCDB' 'OLDDIR'XFR_TMP.DAT/SEQUENTIAL/ALLOC=3 /FIELD=(NAME=LEFTMOST,POSITION=1,SIZE=3,CHARACTER) !SORT labels the 1st byte /FIELD=(NAME=DOCNUM,POSITION=37,SIZE=6,CHARACTER) !as "1", not "0" /FIELD=(NAME=CATEGORY,POSITION=440,SIZE=10,CHARACTER) !unlike DCL /CONDITION=(NAME=MIGRANT,TEST=(LEFTMOST EQ "XFR" AND CATEGORY NE "DICTIONARY")) /INCLUDE=(CONDITION=MIGRANT) /KEY=(DOCNUM,ASCENDING) $! $! Open the necessary files $! $ OPEN/READ SEQDOCDB 'OLDDIR'XFR_TMP.DAT $ OPEN/WRITE INSTRUCTIONS 'NEWDIR'XFR_TMP.SCP $! $! Start writing the instructions into a script $! $! enter some documentation $ WRITE INSTRUCTIONS "! XFR_TMP.SCP" $ WRITE INSTRUCTIONS "! TRANSFER DOCUMENTS FROM ''OLDDIR' TO ''NEWDIR'" $ WRITE INSTRUCTIONS "''F$FAO("!! CREATED AT !%D BY !AS", 0,F$USER() )" $! $! Now we are ready to start browsing through the document database $! $LABEL_TOP: $! $ READ/END=LABEL_MIDDLE SEQDOCDB DOCDB_REC $! $! update the string symbols $ FOLDER = F$EXTRACT(0,30,DOCDB_REC) !find the folder name $ DOCNUM = F$EXTRACT(36,6,DOCDB_REC) !find the "fixer" number $ FILENAME = F$EXTRACT(48,64,DOCDB_REC) !get the VMS filename for the document $ TITLE = F$EXTRACT(113,72,DOCDB_REC) !find the document title $ KEYWORDS = F$EXTRACT(260,50,DOCDB_REC)!find any document keywords $! $! update the true or false symbols $! (WPS-PLUS v3 asks for confirmation when creating a new folder, v2 does not) $ NEED_NEW_FOLDER = (WPS_VERSION .GT. 2 .AND. FOLDER .NES. PRIOR_FOLDER) $ CROSSFILED = (DOCNUM .EQS. PRIOR_DOCNUM) $! $ IF (NEED_NEW_FOLDER) THEN GOSUB LABEL_FOLDER $ IF (CROSSFILED) THEN GOSUB LABEL_CROSS $ IF (.NOT. CROSSFILED) THEN GOSUB LABEL_COPY $ IF (NEED_NEW_FOLDER) THEN GOSUB LABEL_UNFOLD $! $ NUMXFR = NUMXFR + 1 !success $! $ PRIOR_FOLDER = FOLDER $ PRIOR_DOCNUM = DOCNUM $ GOTO LABEL_TOP $! $! Finish writing the instructions $! $LABEL_MIDDLE: $! $! enter the keystrokes for Exit WPS-PLUS $ WRITE INSTRUCTIONS "EX",CR $ $! Now that we have the instructions stored, we execute them $! $ CLOSE INSTRUCTIONS $ CLOSE SEQDOCDB $ WRITE SYS$OUTPUT "''F$FAO(" !ZL DOCUMENT!%S TO TRANSFER",NUMXFR)'" $! $ IF (NUMXFR .EQ. 0) THEN GOTO LABEL_EMPTY $ DEFINE/USER OAUSER 'NEWDIR' !point ourselves to the recipient directory $ WPS/SCRIPT='NEWDIR'XFR_TMP.SCP $ WRITE SYS$OUTPUT " " $ WRITE SYS$OUTPUT "TRANSFER DONE" $ WRITE SYS$OUTPUT " " $! $! Clean up the temporary files $! $ DELETE 'OLDDIR'XFR_TMP.DAT;0,'NEWDIR'XFR_TMP.SCP;0 $ GOTO LABEL_END $! $! Nothing to transfer $! $LABEL_EMPTY: $ WRITE SYS$OUTPUT " " $ WRITE SYS$OUTPUT "THERE WERE NO DOCUMENTS TO COPY" $ WRITE SYS$OUTPUT " " $ GOTO LABEL_END $! $! Subroutines $! $LABEL_COPY: $! concatenate the device, directory, & filename $ FULLFILENAME = OLDDIR - "]" + ( F$EDIT(FILENAME,"TRIM") - "[" ) $! enter the keystrokes for Document Transfer $ WRITE INSTRUCTIONS "RV",CR $ WRITE INSTRUCTIONS FULLFILENAME,CR,BSLF $ WRITE INSTRUCTIONS FOLDER,TAB $ WRITE INSTRUCTIONS TITLE,TAB $ WRITE INSTRUCTIONS KEYWORDS,CR $ RETURN $! $LABEL_CROSS: $! enter the keystrokes for Cross-file a Document $ WRITE INSTRUCTIONS "XFD",CR $ WRITE INSTRUCTIONS FOLDER,CR $ WRITE INSTRUCTIONS TITLE,TAB $ WRITE INSTRUCTIONS KEYWORDS,CR $ RETURN $! $LABEL_FOLDER: $! enter the keystrokes for Create (a dummy file to force creation of a folder) $ WRITE INSTRUCTIONS "C",CR,BSLF $ WRITE INSTRUCTIONS FOLDER,TAB,"Y",CR $ WRITE INSTRUCTIONS DUMMY_TITLE,CR,GOLD_F $ RETURN $! $LABEL_UNFOLD: $! enter the keystrokes for Delete (to remove the dummy file) $ WRITE INSTRUCTIONS "SEL",CR,BSLF $ WRITE INSTRUCTIONS FOLDER,TAB $ WRITE INSTRUCTIONS DUMMY_TITLE,CR $ WRITE INSTRUCTIONS "D",CR $ RETURN $! $! Error handling $! $LABEL_ABNORMAL: $! If the operator presses Control-Y or there is an error, then quit $ SET NOON $ CLOSE INSTRUCTIONS !make sure we leave no files open $ CLOSE SEQDOCDB !before we abort $ GOTO LABEL_END $! $! All done $! $LABEL_END: $ EXIT