1 '	signon subsystem -- convert old USERS file
2 '	RBBENT27.BAS to SIGNON USERS 1.0 format
3 VERSION$="1.03 {8/22/82}"
5 '	by dick lieber
7 '
9 DEFDRIVE$="A:"
10 USERFILE$="USERS"
20 PWDFILE$="pwds"
50 USER0%=0
67 BSTRING$=CHR$(8)+" "+CHR$(8)
68 CRLF$=CHR$(&HA)+CHR$(&HD)
70 DIM ACLARRAY%(5,11)
71 DIM FLAGS%(14)
72 DIM USERS%(600,2)
77 'ON ERROR GOTO 1000
78 DIM ARYCLASS$(10)	'RBBENT27 classes (RG, SP etc.)
79 DIM ARYACLVL%(10)	'RBBEN27 aclvls matching above
80 '
81 '	function definition
82 '
83 '	add deliminators to time or date
84 DEF FNADDSEP$(DS$,DELIM$)=

	LEFT$(DS$,2)+DELIM$+MID$(DS$,3,2)+DELIM$+RIGHT$(DS$,2)
85 '	remove date or time deliminators
86 DEF FNKILLSEP$(DS$)=LEFT$(DS$,2)+MID$(DS$,4,2)+RIGHT$(DS$,2)
88 '	on-off function
90 DIM ONOFF$(1)
91 ONOFF$(0)="Off"
92 ONOFF$(1)="On"
93 DEF FNONOFF$(ONOFF%)=ONOFF$(ONOFF%)
94 DEF FNLINES$(NLINES%)=STRING$(NLINES%,CRLF$)
199 GOTO 10000
200 ' special modified version of this routine for conv.bas only
202 '	packup user record & put
206 ' 1.11 (1300.10)
208 SETUSERNUMBER%=USERNUMBER%: GOSUB 300
210 FLAGS%(0)=EXPERT%
216 FLAGS%(8)=OLDUSER%
217 FLAGS%(9)=NEEDLOC%
218 FLAGS%(10)=DELETED%
224 FLAG%=0
228 FOR INDEX%=14 TO 0 STEP -1
229	MASK=2^INDEX%
230	IF FLAGS%(INDEX%) <> 0 THEN FLAG%= FLAG% OR MASK
234 NEXT INDEX%
236 ACLVL$=STR$(ACLVL%)
238 LSET FACLVL$ = ACLVL$
240 LSET FFNAME$ = FRNAME$
242 LSET FLNAME$ = LNAME$
244 LSET FLOCATION$ = LOCATION$
246 SIGCNT$=STR$(SIGCNT)
248 LSET FSIGCNT$ = SIGCNT$
250 LSET FLASTDATE$ = DATE$
252 LSET FLASTIME$=TIME$
254 ELAPTIME$=STR$(ELAPTIME%)
256 LSET FELAPTIME$=ELAPTIME$
258 TOTALTIME$=STR$(TOTALTIME)
260 LSET FTOTTIME$=TOTALTIME$
262 LSET FPWD$ = PWD$
264 FLAG$=STR$(FLAG%)
266 LSET FFLAG$ = FLAG$
268 LSET FCRLF$=CRLF$
270 PUT #1, REC%
271 RETURN
275 ' put header , close users
276 SETUSERNUMBER%=USERNUMBER%: GOSUB 300
278 LSET FUEXTUSER$ = STR$(NEXTUSER)
280 LSET FUSERSIG$ = "*"
282 LSET FUDATE$=UDATE$
283 LSET FUTIME$=UTIME$
286 LSET FUCRLF$=CRLF$
288 PUT #1,1
290 CLOSE #1
292 RETURN
300 '
302 '	set user number
304 '
306 USERMD=TESTADDRESS+9
312 CALL USERMD(SETUSERNUMBER%)
345 RETURN
400 '
407 '	print a string on con:
414 '	string in A$, CR%=1 no crlf cr%=2 crlf after
435 ' 1.2
442 IF STACKED%<>0 THEN RETURN
449 BREAK%=0
456 XKEY$=INKEY$
463 IF XKEY$=CHR$(3) OR XKEY$="C" OR XKEY$="c" THEN BREAK%=1
470 IF XKEY$=CHR$(18) OR XKEY$="S" OR XKEY$="s" THEN PAUSE%=1 ELSE PAUSE%=0
477 IF PAUSE%<>0 AND LEN(INKEY$)=0 THEN GOTO 477	'wait for key
484 ON CR% GOTO 491,498
491	PRINT A$; : RETURN
498	PRINT A$: RETURN
500 '
503 '	get a string into ANSWER$ (make upper case)
512 ' 1.7	[*** tremendously improved! ***]
515 IF STACKED%<>0 THEN

	ANSWER$=STACKED$:

	STACKED%=0:

	NKEY%=LEN(STACKED$):

	GOTO 557
518 ANSWER$=""
521 KEY$="*"
524 NKEY%=0
527 WHILE NKEY% <= MAX%
530	KEY$=INPUT$(1)
533	KEY%=ASC(KEY$)
536	IF KEY$="~" THEN GOTO 551	'don't allow tilde
539	IF KEY%=13 THEN GOTO 557	'done
542	IF (KEEPLOWER%=0 AND KEY% >= 97 AND KEY%<= 122) THEN KEY%=KEY%-32
545	IF KEY%=127 OR KEY%=8 THEN GOSUB 569	'process backspace
548	IF DELCHAR%=0 THEN

		NKEY%=NKEY%+1:

		PRINT KEY$;:

		ANSWER$=ANSWER$+CHR$(KEY%)

		ELSE

		DELCHAR%=0
551	IF NKEY%<0 THEN NKEY%=0
554 WEND
557 STACKED%=INSTR(ANSWER$,";")
560 IF STACKED%<>0 THEN

	STACKED$=MID$(ANSWER$,STACKED%+1):

	ANSWER$=LEFT$(ANSWER$,STACKED%-1)
563 KEEPLOWER%=0
566 RETURN
569 DELCHAR%=1
572 IF NKEY%=0 THEN RETURN
575 NKEY%=NKEY%-1
578 PRINT BSTRING$;
581 ANSWER$=LEFT$(ANSWER$,LEN(ANSWER$)-1)
584 RETURN
1000 '
1004 '	Error handler
1008 '
1012 A$="Error Trap":CR%=2: GOSUB 400
1020 PRINT "ERR = ";ERR, "ERL = ";ERL
1022 IF ERR=53 THEN NOFILE%=1: RESUME NEXT
1028 ON ERROR GOTO 0
1100 '
1105 '	get passwords & configuration parameters
1115 ' 1.10	##
1120 NOFILE%=0
1125 OPEN "I", #2,DEFDRIVE$+PWDFILE$
1130	IF NOFILE%<>0 THEN CLOSE #1: RETURN
1135	INPUT #2, PWD1$, PWD2$, PWD3$, ALLOWNEW%, SIGNONMESS$, OPTIONMESS$
1140	INPUT #2,BULLFILE$, SUCESSFILE$, OPTIONFILE$, INSTRFILE$,

		 NEWCOMFILE$, NOACCESSFILE$, EXITFILE$,SPECIALFILE$
1145	INPUT #2,PWDACL%, MAXPW%, SYSOPSLVL%, USERNUMBER%, DENIEDCOMMENT%
1150	INPUT #2, CLEARSCR$,NOCLOCK%,SPECIALEVEL%
1155	INPUT #2, MUSTQUALIFY%, QUALQUESTION$, QUALANSWER1$, QUALANSWER2$,

	QUALNONPWD%, MGRDRIVE$
1160	INPUT #2, SKIPFILES%,RAMPOKE%,RAMPOKEADDRESS%,TESTADDRESS
1165	INPUT #2, BYEPOKE%, BYEPARAMS%, BYEPROG$
1170	INPUT #2, SYSOPONLY%,WHEELOPTION%,WHEEL%,

		RESTRICT%,UNRESTRICT%,MODEMCTLOPT%
1175	FOR INDEX%=0 TO 5:

		FOR I%=0 TO 10:

			INPUT #2,ACLARRAY%(INDEX%,I%):

		NEXT I%:

	NEXT INDEX%
1176	INPUT #2, MODEMPORT%, DISCONNECT%, PAGESIZE%
1180 CLOSE #2
1185 RETURN
1200 '
1204 ' find name - get record
1208 ' 1.2
1211 SETUSERNUMBER%=USERNUMBER%: GOSUB 300
1212 NOTFOUND%=0
1216 REC%=2
1220 LAST$=SPACE$(14): FIRST$=RIGHT$(LAST$,10)
1224 LSET FIRST$=FRNAME$: LSET LAST$=LNAME$
1228	GET #1,REC%
1232	IF EOF(1) THEN NOTFOUND%=1:RETURN
1236	IF FFNAME$=FIRST$ AND FLNAME$=LAST$ THEN GOSUB 1300: RETURN
1240	REC%=REC%+1
1244 GOTO 1228
1300 '
1302 ' 1300
1304 ' unpack user record
1306 ' 1.11 (1200.10)
1308 ACLVL%=VAL(FACLVL$)
1310 FRNAME$=FFNAME$
1312 IF RIGHT$(FRNAME$,1)=" " THEN FRNAME$=LEFT$(FRNAME$,LEN(FRNAME$)-1):

		GOTO 1312
1314 LNAME$=FLNAME$
1316 IF RIGHT$(LNAME$,1)=" " THEN LNAME$=LEFT$(LNAME$,LEN(LNAME$)-1):

		GOTO 1316
1318 LOCATION$=FLOCATION$
1320 SIGCNT=VAL(FSIGCNT$)
1322 LASTDATE$=FLASTDATE$
1324 LASTTIME$=FLASTIME$
1326 ELAPTIME%=VAL(FELAPTIME$)
1328 TOTALTIME=VAL(FTOTTIME$)
1330 PWD$=FPWD$
1332 FLAG%=VAL(FFLAG$)
1334 MASK=1
1336 FOR INDEX% = 14 TO 0 STEP -1
1337	MASK=2^INDEX%
1338	IF FLAG% AND MASK THEN FLAGS%(INDEX%)=1 ELSE FLAGS%(INDEX%)=0
1340	MASK=MASK * 2
1342 NEXT INDEX%
1344 EXPERT%=FLAGS%(0)
1360 OLDUSER%=FLAGS%(8)
1361 NEEDLOC%=FLAGS%(9)
1362 DELETED%=FLAGS%(10)
1374 RETURN
1400 '
1403 ' open USERS
1406 ' 1.7
1409 IF VIEWFILE$="" THEN SETUSERNUMBER%=USERNUMBER%

	ELSE SETUSERNUMBER%=0
1410 GOSUB 300
1412 IF VIEWFILE$="" THEN

	FILE$= DEFDRIVE$+USERFILE$

	ELSE FILE$=MGRDRIVE$+VIEWFILE$
1413 OPEN "R", #1, FILE$, 88
1415 FIELD #1,

	5 AS FUEXTUSER$,

	1 AS FUSERSIG$,

	6 AS FUDATE$,

	6 AS FUTIME$,

	2 AS FUCRLF$
1418 GET #1, 1
1421 NEXTUSER=VAL(FUEXTUSER$)
1424 UDATE$=FUDATE$
1425 UTIME$=FUTIME$
1427 IF FUSERSIG$ <> "*" THEN

	NEXTUSER=2:

	GOSUB 1600:

	UDATE$ = DATE$:

	UTIME$=TIME$
1430 FIELD #1,

	3 AS FACLVL$,

	10 AS FFNAME$,

	14 AS FLNAME$,

	15 AS FLOCATION$,

	5  AS FSIGCNT$,

	6  AS FLASTDATE$,

	6  AS FLASTIME$,

	6  AS FTOTTIME$,

	3  AS FELAPTIME$,

	13 AS FPWD$,

	5  AS FFLAG$,

	2  AS FCRLF$
1433	RETURN
1600 '
1602 ' date process and time
1604 ' 1.1
1642 '
1644 TIMEMD=TESTADDRESS
1646 DATEMD=TESTADDRESS+3
1648 DAYMD=TESTADDRESS+6
1650 IF NOCLOCK%<>0 THEN

	DATE$="xxxxxx":

	TIME$="xxxxxx":

	DAY$="":

	RETURN
1651 ODATE$=STRING$(12,"$")
1652 CALL DATEMD(ODATE$)
1654 DATE$=FNKILLSEP$(LEFT$(ODATE$,8))
1658 '	get time
1661 OTIME$=STRING$(12,"$")
1662 CALL TIMEMD(OTIME$)
1664 TIME$=FNKILLSEP$(LEFT$(OTIME$,8))
1668 '	get day of week
1672 DAY$=""
1674 IF GETDAY%=0 THEN RETURN
1676 ODAY$=STRING$(10,"$")
1678 CALL DAYMD(ODAY$)
1680 FOR I%=1 TO LEN(ODAY$)
1682	IF MID$(ODAY$,I%,1)<>"$" THEN DAY$=DAY$+MID$(ODAY$,I%,1)
1684 NEXT I%
1686 GETDAY%=0
1688 RETURN
1700 '
1705 '	set default values to working individual variables
1710 ' 1.1
1715 ACLVL%=0
1720 SIGCNT=0
1725 NEWCOMER%=0
1730 SYSOP%=0
1735 PWD$= STRING$(13,42) ' *s
1740 LOCATION$=""
1745 LTIME$="      "
1750 LDATE$="      "
1755 ELAPTIME%=0
1760 TOTALTIME=0
1765 NOTATION$="normal"
1766 EXPERT%=0
1767 OLDUSER%=0
1770 RETURN
2500 '
2503 '	display userfile$
2506 '1.8
2509 GOSUB 3100
2512 PRINT
2515 GOSUB 1400
2518 INDEX=1
2521 COUNTER%=0
2524 COUNTER1%=0
2527 SAVEDACLVL%=ACLVL%
2528 PRINT TAB(20);"Press ^K to abort listing."
2530 PRINT

"rec    first last, location                 uses     last use      total time"+CRLF$
2533 GET #1,INDEX+1
2536	IF EOF(1) OR INDEX=NEXTUSER-1 THEN GOTO 2557
2537	IF INKEY$=CHR$(&HB) THEN ABORT%=1: GOTO 2557

		ELSE ABORT%=0
2539	GOSUB 1300	'transfer to working vars
2542	IF RIGHT$(LOCATION$,1)=" " THEN

		LOCATION$ = LEFT$(LOCATION$,LEN(LOCATION$)-1): GOTO 2542
2545	IF DELETED%=1 THEN LOCATION$= "**deleted**":

		 COUNTER%=COUNTER%+1

		ELSE 

		 COUNTER1%=COUNTER1%+1
2548	PRINT USING "### \                                    \ ###  & &   #### ";

		INDEX;FRNAME$+" "+LNAME$+", "+LOCATION$;

		SIGCNT;FNADDSEP$(LASTDATE$,"/");

		FNADDSEP$(LASTTIME$,":");

		TOTALTIME
2551	INDEX=INDEX+1
2554 GOTO 2533
2557 PRINT
2560 IF VIEWFILE$="" THEN PRINT "User file reorganized";

	ELSE PRINT "User archive made";: VIEWFILE$=""
2563 PRINT " on ";FNADDSEP$(UDATE$,"/"); " at ";FNADDSEP$(UTIME$,":");"."
2564 PRINT
2565 IF ABORT% THEN PRINT

  TAB(35);"** Aborted **    (totals based on displayed data only)"+CRLF$
2566 PRINT " Active Users: ";COUNTER1%
2569 PRINT "Deleted Users: ";COUNTER%
2572 PRINT "Total Entries: ";COUNTER1%+COUNTER%
2575 GOSUB 4700
2578 CLOSE #1
2581 ACLVL%=SAVEDACLVL%
2584 RETURN
3100 '
3105 '	clear screen
3110 '
3115 A$=CLEARSCR$:CR%=1:GOSUB 400: RETURN
3300 '
3305 '	make selection
3310 '
3315 MAX%=0:GOSUB 500
3320 IF ANSWER$="" THEN SELECTION%=0: RETURN
3325 SELECTION%=ASC(ANSWER$)-64
3327 IF SELECTION% < 0 THEN SELECTION%=0
3330 RETURN
4700 '
4705 '	pause 
4710 '
4715 PRINT:PRINT TAB(25);
4720 LINE INPUT "Press RETURN to continue."; A$
4725 RETURN
5100 '
5104 '	Subsystem Manager - Main menu
5108 ' 1.0
5112 GOSUB 3100
5116 PRINT
5120 PRINT TAB(30);"USER Maintainer"
5124 PRINT TAB(30);"<version ";VERSION$;">"
5128 PRINT
5132 PRINT TAB(20);"a	Go back to subsystem manager."
5156 PRINT TAB(20);"b	Display the roster of users."
5160 PRINT TAB(20);"c	Sort USER file."
5164 PRINT TAB(20);"d	Remove deleted user's records."
5168 PRINT TAB(20);"e	View a USER archive file."
5172 ' PRINT TAB(20);"f	Fetch a user's record from an archive."
5180 ' PRINT TAB(20);"g	Time of day"
5182 PRINT: PRINT TAB(20);"q	Leave subsystem manager."
5184 PRINT:PRINT TAB(25);"Press the letter of your selection > ";
5188 GOSUB 3300	'selector
5192 RETURN
5300 '
5304 '	exit module
5308 '
5310 SETUSERNUMBER%=0:GOSUB 300
5316 END
7100 '
7105 '	 back to POSYS
7110 '
7115 SETUSERNUMBER%=0: GOSUB 300
7120 JUMPFILE$="POSYS"
7125 GOSUB 7800
7130 RETURN
7800 '
7807 '	generalized jumpout (chain)
7814 '1.1
7821 GOSUB 3100
7828 PRINT FNLINES$(4)
7835 PRINT TAB(20);"Chaining to ";JUMPFILE$;"."
7842 PRINT FNLINES$(2)
7849 PRINT TAB(20);"Please wait."
7856 CHAIN JUMPFILE$
7863 GOSUB 3100
7870 PRINT FNLINES$(4)
7877 PRINT TAB(25); JUMPFILE$;" is not available."
7884 GOSUB 4700
7891 RETURN
8100 '
8104 '	close temp & change to new USERFILE$
8108 '1.1
8112 GOSUB 1600
8116 LSET TFUEXTUSER$=STR$(RECTEMP+1)	'NEXTuser
8120 LSET TFUSERSIG$="*"
8124 LSET TFUDATE$=DATE$
8128 LSET TFUTIME$=TIME$
8132 LSET TFUCRLF$=CRLF$
8136 SETUSERNUMBER%=USERNUMBER%: GOSUB 300
8140 PUT #2,1
8144 CLOSE #1: CLOSE #2
8147 KILL DEFDRIVE$+USERFILE$+".UBK"
8148 NAME DEFDRIVE$+USERFILE$ AS DEFDRIVE$+USERFILE$+".UBK"
8152 NAME DEFDRIVE$+USERFILE$+".$$$" AS DEFDRIVE$+USERFILE$
8156 RETURN
8300 '
8304 '	put into temp
8308 '
8312 LSET MSTRTEMP$=MSTRUSER$
8316 RECTEMP = RECTEMP+1
8320 SETUSERNUMBER%=USERNUMBER%: GOSUB 300
8324 PUT #2, RECTEMP
8328 RETURN
8400 '
8404 '	put into archive
8408 '
8412 LSET MSTRARCH$=MSTRUSER$
8416 RECARCH = RECARCH+1
8420 SETUSERNUMBER%=0: GOSUB 300
8424 PUT #3, RECARCH
8428 RETURN
8500 '
8504 '	open work file of USERS
8508 '
8512 SETUSERNUMBER%=USERNUMBER%: GOSUB 300
8516 OPEN "R", #2, DEFDRIVE$+USERFILE$+".$$$", 88
8520 FIELD #2, 88 AS MSTRTEMP$
8524 FIELD #2,

	5 AS TFUEXTUSER$,

	1 AS TFUSERSIG$,

	6 AS TFUDATE$,	

	6 AS TFUTIME$,

	2 AS TFUCRLF$
8528 RECTEMP=1
8532 RETURN
8600 '
8604 '	open archive USERS
8608 '1.1
8612 SETUSERNUMBER%=0: GOSUB 300
8616 GOSUB 1600
8620 OPEN "R", #3, MGRDRIVE$+FNADDSEP$(DATE$,SEP$)+".USR", 88
8624 FIELD #3, 88 AS MSTRARCH$
8628 FIELD #3,

	5 AS AFUEXTUSER$,

	1 AS AFUSERSIG$,

	6 AS AFUDATE$,

	6 AS AFUTIME$,

	2 AS AFUCRLF$
8632 RECARCH=1
8636 RETURN
9500 '
9503 '	read record from old users file
9506 '	transfer to working variables
9509 '	rbbent27.bas compatable version
9512 ' 0.1
9513	SETUSERNUMBER%=OLDUSERNUMBER%: GOSUB 300
9515	GET #2, I%
9518	SPACESEP%=INSTR(FRLNLOC$," ")
9521	OFIRST$=LEFT$(FRLNLOC$,SPACESEP%-1)
9524	SPCSEP2%=INSTR(SPACESEP%+2,FRLNLOC$," ")
9527	OLAST$=MID$(FRLNLOC$,SPACESEP%+1,SPCSEP2%-SPACESEP%-1)
9530	LOCLENGTH%=48-SPCSEP2%
9533	LOCATION$=RIGHT$(FRLNLOC$,LOCLENGTH%)
9536	IF RIGHT$(LOCATION$,1)=" " THEN

		LOCATION$=LEFT$(LOCATION$,LEN(LOCATION$)-1): GOTO 9536
9537 REC%=I%
9538	ACLVL%=DEFACLVL%
9539	FOR J%=0 TO CLASSES%	'change access level from default
9540		IF CLASS$=ARYCLASS$(J%) THEN ACLVL%=ARYACLVL%(J%)
9541	NEXT J%
9542	COUNT%=VAL(COUNT$)
9543	PRINT "  record:";REC%
9544	PRINT "   class:>";CLASS$;"<"
9545	PRINT "    last:>";OLAST$;"<"
9548	PRINT "   first:>";OFIRST$;"<"
9551	PRINT "location:>";LOCATION$;"<"
9554	PRINT "   count:";COUNT%
9555	PRINT "acc levl:";ACLVL%
9557	PRINT "===================================="
9563	FRNAME$=OFIRST$		'first name
9566	LNAME$=OLAST$		'last name
9572	SIGCNT=COUNT%		'usage counter 
9574	OLDUSER%=1
9587 RETURN
9600 '
9610 '	open users.rbb file
9615 '	works with rbbrnt27.bas
9620 '0.2
9625 SETUSERNUMBER%=OLDUSERNUMBER%: GOSUB 300
9630 OPEN "r", #2, OLDUSER$, 62
9640 FIELD #2,

	2  AS CLASS$,

	48 AS FRLNLOC$,

	4  AS COUNT$,

	6  AS DATE$,

	2  AS CR$
9650 GET #2,1	'read header
9660 FIELD #2, 5 AS USERS$
9670 USERS=VAL(USERS$)
9675 GOSUB 3100
9680 PRINT: PRINT OLDUSER$;" open.  - ";USERS;"in the file."
9685 PRINT:PRINT
9690 RETURN
9700 '
9701 '	request conversion parameters
9702 '
9703 GOSUB 3100		'clear screen
9704 PRINT:PRINT TAB(25);"USERS file convertor"
9705 PRINT TAB(20);"RBBENT27.BAS version ";VERSION$
9706 FOR I%=0 TO 10
9707	ARYCLASS$=""
9708 NEXT I%
9709 PRINT:PRINT: USERFILE$="USERS"
9710 PRINT TAB(24);"Name of old USERS file > ";
9711 MAX%=14: GOSUB 500
9712 IF NKEY%=0 THEN GOTO 9703 ELSE OLDUSER$=ANSWER$
9713 TABER%=15-LEN(OLDUSER$)
9714 PRINT: PRINT TAB(TABER%);"User number where ";OLDUSER$;" can be found > ";
9715 MAX%=2: GOSUB 500
9716 IF NKEY%=0 THEN GOTO 9703 ELSE

	OLDUSERNUMBER%=VAL(ANSWER$)
9717 PRINT:PRINT
9718 PRINT TAB(20);"Assign SIGNON access levels to RBBENT27 classes."
9719 PRINT TAB(20);"Enter ** when finished with list."
9720 PRINT TAB(20);"Examples of classes are RG for regular, SP for special."
9721 PRINT:PRINT

	 "Remeber that access levels above";PWDACL%;"will have passwords."
9722 PRINT:PRINT

	"and those from"; SPECIALEVEL%;"on up are special users."
9723 PRINT : PRINT TAB(6);"class"; TAB(18); "access level"
9724 FOR I%=0 TO 10
9725	PRINT TAB(5);"> ";
9726	MAX%=1: GOSUB 500
9727	IF NKEY%=0 THEN GOTO 9725
9728		ARYCLASS$(I%)=ANSWER$ 
9729	IF ANSWER$="**" THEN GOTO 9734
9730	PRINT TAB(20);"> ";
9731	MAX%=1: GOSUB 500
9732	IF NKEY%=0 THEN PRINT "Class ";ARYCLASS$;" ignored - re-enter":

		GOTO 9725

		ELSE ARYACLVL%(I%)=VAL(ANSWER$)
9733 NEXT I%
9734 PRINT:PRINT TAB(20);"Everyone else should be assigned access level > ";
9735 MAX%=2: GOSUB 500
9736 IF NKEY%=0 THEN GOTO 9734
9737 IF VAL(ANSWER$) > 10 THEN PRINT "Too high!": GOTO 9734
9738 DEFACLVL%=VAL(ANSWER$)
9739 '
9740 '	confirm selection
9741 '
9742 GOSUB 3100
9743 PRINT:PRINT:PRINT
9744 PRINT "Old USERS file: ";OLDUSER$;" in user";OLDUSERNUMBER%
9745 PRINT
9746 IF OLDUSER$=USERFILE$ AND OLDUSERNUMBER%=USERNUMBER% THEN

	USERFILE$=USERFILE$+".NEW"
9747 PRINT: PRINT "New USERS file: ";USERFILE$;" in user";USERNUMBER%
9748 IF USERFILE$="USERS.NEW" THEN

	PRINT:

	PRINT TAB(10);"Since your old USERS file is the same name as":

	PRINT TAB(10);"the new USERS and in the same user area,"
9749 IF USERFILE$="USERS.NEW" THEN

	PRINT TAB(10);"the new USERS file is being re-named as":

	PRINT TAB(10);"USERS.NEW. You'll have to change it to":

	PRINT TAB(10);"USERS later."
9750 PRINT: PRINT "Default access level is";DEFACLVL%
9751 PRINT: PRINT "Other classes of users will be:"
9753 PRINT "class    level"
9754 FOR I%=0 TO 10
9755	IF ARYCLASS$(I%)<>"**" AND ARYCLASS$(I%)<>""

		 THEN PRINT ARYCLASS$(I%); TAB(11); ARYACLVL%(I%)
9756 NEXT I%
9757 PRINT:PRINT "Is all of this ok? > ";
9758 MAX%=0: GOSUB 500
9759 IF ANSWER$="N" THEN GOTO 9703
9760 RETURN
10000 '
10005 '	main program starts here
10010 ' 1.0
10020 GOSUB 1100	'get configuration parameters
10022 GOSUB 9700	'get parameters for conversion
10025 GOSUB 9600	'open old USERS file
10030 GOSUB 1400	'open new users file
10035 '
10040 ' main transfer loop
10045 '
10050 FOR I%=2 TO USERS
10052	GOSUB 1700		'assign default variables
10055	GOSUB 9500		'move to working
10060	GOSUB 200		'write to SIGNON users file
10065 NEXT I%
10070 '
10075 '	update new user file's header
10080 '
10085 NEXTUSER=I%	'next available slot in USERS file
10086 GOSUB 1600	'get date & time
10090 UDATE$=DATE$	'date file was re-organized
10095 UTIME$=TIME$	'time of re-org
10100 GOSUB 275		'finish up header & close file
10200 GOSUB 3100
10210 PRINT:PRINT:PRINT
10220 PRINT TAB(20);USERFILE$;" written.
10300 SETUSERNUMBER%=0: GOSUB 300
20000 END
