1000 REM Utility to read the expired account file and generate the deletion 1010 REM requests. Also removes the users from ADDS.INDEX 1020 REM V1.00 - tmk - 11/25/89 1030 REM 1040 REM 1050 REM Open files 1060 open "SET_UP_TO_DELETE.TMP" for input as file #1%, & recordtype any 1070 open "REMOVE_FROM_UAF.COM" for output as file #2%, & organization sequential variable 1080 open "REMOVE_FROM_QUOTA.COM" for output as file #3%, & organization sequential variable 1090 open "DELETE_DIRECTORY.COM" for output as file #4%, & organization sequential variable 1095 open "REMOVE_FROM_MAIL.COM" for output as file #6%, & organization sequential variable 1100 map (indexfile) string uname$=12%, ussn$=9%, adate$=11%, fill$=48% 1110 open "ADDS.INDEX" as file #5%, & organization indexed, & recordsize 80%, & map indexfile, & primary key uname$, & alternate key ussn$ 1120 REM 1130 REM Write headers and stuff to the files 1140 print #2%,"$ ! REMOVE_FROM_UAF.COM created on ";date$(0%);" at ";time$(0%);"." 1145 print #2%,"$ SET NOON" 1150 print #2%,"$ DEFINE SYSUAF SYS$SYSTEM:SYSUAF.DAT" 1160 print #2%,"$ MCR AUTHORIZE" 1170 print #3%,"$ ! REMOVE_FROM_QUOTA.COM created on ";date$(0%);" at ";time$(0%);"." 1175 print #3%,"$ SET NOON" 1180 print #3%,"$ MCR DISKQUOTA" 1200 print #4%,"$ ! DELETE_DIRECTORY.COM created on ";date$(0%);" at ";time$(0%);"." 1205 print #4%,"$ SET NOON" 1206 print #6%,"$ ! REMOVE_FROM_MAIL.COM created on ";date$(0%);" at ";time$(0%);"." 1207 print #6%,"$ SET NOON" 1208 print #6%,"$ MAILUAF" 1210 REM 1220 REM Process an input record 1230 on error goto 1480 1240 input line #1%,raw_record$ 1250 on error goto 0 1260 user$=mid(raw_record$,7%,12%) ! Username 1270 dir$=mid(raw_record$,29%,39%) ! Default directory 1271 dev$=left$(dir$,instr(1%,dir$,":")) 1275 goto 1550 if user$="ecords match" 1280 print "Now processing: ";user$ 1290 on error goto 1460 1300 REM 1310 REM Remove from index file 1320 find #5%, key #0% eq user$ 1330 delete #5% 1340 on error goto 0 1350 REM 1360 REM Remove record from UAF 1370 print #2%,"REMOVE ";user$ 1380 REM 1390 REM Now remove the quota entry 1400 print #3%,"USE ";dev$ 1405 print #3%,"REMOVE ";user$ 1410 REM 1420 REM Now delete the directory contents and entry 1430 print #4%,"$ DELETE ";left(dir$,len(dir$)-4%);"...]*.*;*" 1431 i%=0% 1432 j%=instr(i%,dir$,".") 1433 goto 1435 if j%=0% 1434 i%=j%+1% 1435 print #4%;"$ DELETE ";left$(dir$,i%-2%);"]";edit$(user$,2%);".DIR;" 1436 REM 1437 REM Remove from MAIL_PROFILE as well 1438 print #6%,"REMOVE ";user$ 1440 goto 1230 1450 REM Error handler for duplicate username 1460 print "Not in index file, continuing..." 1470 resume 1340 1480 REM 1490 REM Error handler for end of input 1500 close #1% 1510 close #2% 1520 close #3% 1530 close #4% 1540 close #5% 1542 close #6% 1545 resume 1550 1550 end