OENTRIES% 2220 IF CLASSNO%(I%) = CLASSNO% THEN 2300 2230 NEXT I% 2250 !Class not found 2260 PRINT BELL$; "Can't find this class." \ & GOTO 2110 2300 !Class found 2310 INDEX% = I% 2320 CLASSNAME$ = CLASSNAME$(INDEX%) \ & PROJECT% = PROJECT%(INDEX%) \ & LAST% = LAST%(INDEX%) 2330 ZERO$ = "[" + NUM1$(PROJECT%) + ",0]" 2400 !Print data for user 2410 PRINT \ & PRINT "Class: "; CLASSNAME$ \ & PRINT "Project number: "; PROJECT% 2420 IF PROJECT% = 141% & THEN PRINT "Sorry, project 241 is used for FORTRAN." 2430 PRINT \ & INPUT "Continue "; ANSWER$ \ & ANS$ = CVT$$(LEFT(ANSWER$,1%),32%) \ & IF ANS$ = "" THEN ANS$ = "Y" 2440 IF ANS$ <> "Y" THEN 900 2500 ! 2990 RETURN 3000 !Subroutine: Get the option 3100 !Print the list 3110 PRINT CLEAR$; 3120 PRINT "Options available are:" \ & PRINT \ & PRINT "CREATE to create accounts" \ & PRINT "TAPE to PIP accounts to tape" \ & PRINT "DELETE to delete accounts" \ & PRINT "MOVE to PIP accounts to new project" \ & PRINT "EXIT to quit the program" \ & PRINT 3200 !Get the option 3210 INPUT "Option"; OPTION$ \ & O$ = CVT$$(LEFT(OPTION$,1%),32%) 3220 IF O$ = "" THEN O$ = "E" 3300 !Which one is it 3310 OPTION% = INSTR(1%,"CTDME",O$) 3320 IF OPTION% = 0% & THEN PRINT BELL$;"That option not available." \ & GOTO 3210 3990 RETURN 9000 !Error routine 9100 !Expected errors 9110 IF ERR = 28 & THEN CLOSE #1%, #2% \ & GOTO 32767 & !^C error 9120 IF ERR = 11 THEN RESUME 300 9130 IF ERL = 1420 THEN RESUME 1450 9140 IF ERL = 11150 AND ERR = 16% THEN RESUME 11160 & !Account already exists (for zero account) 9150 IF ERL = 11440 AND ERR = 16% THEN RESUME 11460 & !Account already exists (for general case) 9160 IF ERL = 13140 AND ERR = 5 THEN RESUME 13160 & !If file to delete isn't there, just go on (zero case) 9170 IF (ERL = 13230 OR ERL = 13220) THEN RESUME 13270 & !If file to delete isn't there, just go on (general case) 9180 IF ERL = 14340 AND ERR = 16 THEN RESUME 14400 & !MOVE tried to create a file that was already there 9200 !^Z 9210 IF ERR = 11 THEN RESUME 200 9900 !Unexpected errors 9910 Z$ = SYS(CHR$(6%)+CHR$(9%)+CHR$(ERR)) 9920 ERROR$ = RIGHT(Z$,3%) 9930 PRINT " ***** I can't handle this one *****" \ & PRINT " "; ERROR$; " at line";ERL 9940 GOTO 32767 11000 !Subroutine: CREATE option & !See the RSTS/E programming manual for a description of the use & !of the SYS function used here. 11100 !Do the zero account 11120 PRINT "This program treats account ";ZERO$;" seperately." \ & PRINT "Don't worry. If the account already exists, it will not be deleted." 11130 PRINT "Password for "; ZERO$; \ & INPUT PASS$ 11140 PASS$ = FNR50$(PASS$) !Convert to Radix-50 11150 Z$ = SYS(CHR$(6%)+CHR$(0%)+STRING$(5%,0%)+CHR$(PROJECT%)+PASS$) \ & PRINT "Account "; ZERO$; ",0] created." \ & GOTO 11200 & !If account already exist, error routine will branch to 11160 11160 PRINT BELL$;"Account ";ZERO$;" already exists." \ & GOTO 11200 11200 !Ask about the other accounts 11210 PRINT \ & INPUT "How many accounts to be created"; LAST% 11230 INPUT "Password"; PASS$ \ & PASS$ = FNR50$(PASS$) & !Convert to Radix-50 11300 !set up the permanent part of the string 11310 DIM A%(30%) 11320 A%( 0%) = 30% \ & A%( 1%) = 6% \ & A%( 2%) = 0% \ & A%( 8%) = PROJECT% \ & A%(14%) = 0% \ & A%(13%) = 100% 11330 A%(8%+I%) = ASCII(MID(PASS$,I%,1)) FOR I% = 1% TO 4% 11400 !Create the accounts 11410 FOR PG% = 1% TO LAST% 11420 A%(7%) = PG% 11430 CHANGE A% TO A$ 11440 Z$ = SYS(A$) & !If account aleady exists, error routine branches to 11470 11445 PRINT "Account ["; NUM1$(PROJECT%); ","; NUM1$(PG%); & "] created." 11450 GOTO 11470 11460 PRINT BELL$; "Account ["; NUM1$(PROJECT%); ","; NUM1$(PG%); & "] already exists." 11470 NEXT PG% 11500 !Put number of accounts in the data file 11510 LAST%(INDEX%) = LAST% 11600 !Print message 11610 PRINT \ & PRINT LAST%;"accounts were created." 11700 !Password disabling? 11710 INPUT "Do you want to allow disabling of passwords"; ANSWER$ \ & ANCLASS BAS[.050021]CLASS .BAS[.050021]    X14|H [4;Ik(&'( k ߫H&P` \RrPP2PPzPP{PPPPP2P~\$\\TD 0D \~ hi) +\ ^( n ^( np\^txY\^ˀ\!kVk<\F˰<˴ˬ\VVkˤ1`@lP ABCDEFGHIJKLMNOPQRSTUVWXYZ$.?0123456789<@<SЬTЬ UQS>?\\\\\\\\\`:#@'="\abcdefghi\\\\\\\jklmnopqr\\\\\\\~stuvwxyz\\\\\\\\\\\\\\\\\\\\\\{ABCDEFGHI\\\\\\}JKLMNOPQR\\\\\\\\STUVWXYZ\\\\\\0123456789\\\\\  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ABCDEFGHIJKLMNOPQRSTUVWXYZ{|}~@ggh<i|o<m<4p<p<k|Zn<l fr rwx<x<x<x޺<w@]@@fjnr]Ze@@|> | |v<H|  |  |xz|  |zt f r   < &^ @&@'*/V,"?Lh:hmBmz|z{x`y~|fN|@@|@͂|@ ݃ƃ<ns<|Ŏ |️|ep|u|-@率|<ᄇ2ֻr||ZRM | ntB|xyvZw|J=|R>|J? nnaa|bddfommand file and "; \ & PRINT "chain to AT." 12100 !May want a different account number 12110 PRINT "Project number for tape <"; NUM1$(PROJECT%); ">"; \ & INPUT TAPEPROJ% 12120 IF TAPEPROJ% = 0% THEN TAPEPROJ% = PROJECT% 12130 INPUT "Zero the tape first"; ANSWER$ \ & ANS$ = CVT$$(LEFT(ANSWER$,1%),32%) 12140 IF ANS$ = "Y" & THEN ZEROTAPE% = 1% \ & GOTO 12200 12150 IF ANS$ <> "N" & THEN PRINT 'Please answer "YES" or "NO".' \ & GOTO 12130 12200 !Build the command file 12210 OPEN "CLASS.CMD" FOR OUTPUT AS FILE #3% 12220 PRINT #3%, "RUN $PIP" 12225 IF ZEROTAPE% = 1% & THEN PRINT #3%, "MT:/ZE" \ & PRINT #3%, "YES" 12230 INPUT "Tape the zero account"; ANSWER$ \ & ANS$ = CVT$$(LEFT(ANSWER$,1%),32%) \ & IF ANS$ = "Y" & THEN PRINT #3%, "MT0:[";NUM1$(TAPEPROJ%);",0] = ["; \ & PRINT #3%, NUM1$(PROJECT%);",0]/W" 12235 FOR PG% = 1% TO LAST% 12240 PRINT #3%, "MT0:[";NUM1$(TAPEPROJ%);",";NUM1$(PG%);"] = "; \ & PRINT #3%, "[";NUM1$(PROJECT%);",";NUM1$(PG%);"]/W" 12250 NEXT PG% 12260 PRINT #3%, "^Z" 12270 CLOSE #3% 12300 !Chain to AT via the CCL 12310 Z$ = SYS(CHR$(14%)+"AT CLASS") 12990 RETURN 13000 !Subroutine: DELETE option 13100 !May not want to delete the zero account 13110 PRINT "Do you want to delete "; ZERO$; \ & INPUT ANSWER$ \ & ANS$ = CVT$$(LEFT(ANSWER$,1),32%) 13120 IF ANS$ <> "Y" THEN 13200 13130 Z$ = SYS(CHR$(6%)+CHR$(13%)+STRING$(3%,0%)+CHR$(PROJECT%)) & !Zero the account 13140 Z$ = SYS(CHR$(6%)+CHR$(1%)+STRING$(5%,0%)+CHR$(PROJECT%)) \ & PRINT "Account "; ZERO$; " deleted." & !Delete the account 13150 GOTO 13200 13160 PRINT "Account "; ZERO$; " already deleted." 13200 !Do the other accounts 13210 FOR PG% = 1% TO LAST% 13220 Z$ = SYS(CHR$(6%)+CHR$(13%)+CHR$(255%)+CHR$(0%) & +CHR$(PG%)+CHR$(PROJECT%)) & !Zero the account 13230 Z$ = SYS(CHR$(6%)+CHR$(1%)+STRING$(4%,0%)+CHR$(PG%)+CHR$(PROJECT%)) & !Delete the account 13240 PRINT "Account ["; NUM1$(PROJECT%); ","; NUM1$(PG%); "] deleted." 13250 NEXT PG% 13260 GOTO 13300 13270 PRINT "Account ["; NUM1$(PROJECT%); ","; NUM1$(PG%); \ & PRINT "] can't be deleted." \ & GOTO 13250 13280 LAST%(INDEX%) = 0% 13300 ! 13990 RETURN 14000 !Subroutine: MOVE option 14010 PRINT "This part of the program will create a command file and "; \ & PRINT "chain to AT." 14100 !New account number 14110 INPUT "New account number"; NEWPROJ% 14120 IF NEWPROJ% = 0% THEN NEWPROJ% = PROJECT% 14200 !Fixed part of SYS arguments 14210 DIM CREATE%(14%) 14220 CREATE%( 0%) = 14% \ & CREATE%( 1%) = 6% \ & CREATE%( 2%) = 0% \ & CREATE%( 8%) = NEWPROJ% \ & CREATE%(14%) = 0% & !for creating the account 14230 DIM LOOK%(8%) 14240 LOOK%( 0%) = 8% \ & LOOK%( 1%) = 6% \ & LOOK%( 2%) = 14% \ & LOOK%( 8%) = PROJECT% & !for looking up password 14300 !Create the accounts 14310 FOR PG% = 0% TO LAST% 14320 LOOK%(7%) = PG% \ & CHANGE LOOK% TO Z$ \ & Z$ = SYS(Z$) \ & PASS$ = MID(Z$,9%,4%) & !look up the password. See RSTS/E programming manual 14330 IF PG% = 0% THEN CREATE%(13%) = 0% ELSE CREATE%(13%) = 100% 14340 CREATE%(7%) = PG% \ & CHANGE CREATE% TO Z$ \ & Z$ = LEFT(Z$,8%) + PASS$ + RIGHT(Z$,13%) \ & Z$ = SYS(Z$) & !create the new account. See RSTS/E programming manual 14350 NEXT PG% 14360 GOTO 14500 14400 !Tried to create an existing file 14410 PRINT BELL$; \ & PRINT "["; NUM1$(NEWPROJ%); ","; NUM1$(PG%); "] already exists." \ & PRINT "MOVE aborted." \ & RETURN 14500 ! 14800 !Build the command file 14810 OPEN "CLASS.CMD" FOR OUTPUT AS FILE #3% 14820 PRINT #3%, "RUN $PIP" 14830 FOR PG% = 0% TO LAST% 14840 PRINT #3%, "[";NEWPROJ%;",";PG%;"] = [";PROJECT%;",";PG%;"]" 14850 NEXT PG% 14860 PRINT #3%, "^Z" 14870 CLOSE #3% 14900 !Chain to AT via the CCL 14910 Z$ = SYS(CHR$(14%)+"AT CLASS") 14990 RETURN 20000 !Functions 21000 !Password to radix-50 (as four characters) & !See the RSTS/E programming manual for an explanation 21010 DEF FNR50$(P$) = MID( SYS(CHR$(6%)+CHR$(-10%)+P$), 7%,4%) 32767 END CLASS BAS[.050021]CLASS .BAS[.050021]   X14