5 ON ERROR GOTO 10000
120 M1$="RANDOM":OPEN "test.dat" FOR RANDOM AS 1:GOSUB 1000
130 M1$="RANDOM ACCESS READ":OPEN "test.dat" FOR RANDOM ACCESS READ AS 1:GOSUB 1000
140 M1$="RANDOM ACCESS WRITE":OPEN "test.dat" FOR RANDOM ACCESS WRITE AS 1:GOSUB 1000
150 M1$="RANDOM ACCESS READ WRITE":OPEN "test.dat" FOR RANDOM ACCESS READ WRITE AS 1:GOSUB 1000
220 M1$="RANDOM SHARED":OPEN "test.dat" FOR RANDOM SHARED AS 1:GOSUB 1000
230 M1$="RANDOM ACCESS READ SHARED":OPEN "test.dat" FOR RANDOM ACCESS READ SHARED AS 1:GOSUB 1000
240 M1$="RANDOM ACCESS WRITE SHARED":OPEN "test.dat" FOR RANDOM ACCESS WRITE SHARED AS 1:GOSUB 1000
250 M1$="RANDOM ACCESS READ WRITE SHARED":OPEN "test.dat" FOR RANDOM ACCESS READ WRITE SHARED AS 1:GOSUB 1000
320 M1$="RANDOM LOCK READ":OPEN "test.dat" FOR RANDOM LOCK READ AS 1:GOSUB 1000
330 M1$="RANDOM ACCESS READ LOCK READ":OPEN "test.dat" FOR RANDOM ACCESS READ LOCK READ AS 1:GOSUB 1000
340 M1$="RANDOM ACCESS WRITE LOCK READ":OPEN "test.dat" FOR RANDOM ACCESS WRITE LOCK READ AS 1:GOSUB 1000
350 M1$="RANDOM ACCESS READ WRITE LOCK READ":OPEN "test.dat" FOR RANDOM ACCESS READ WRITE LOCK READ AS 1:GOSUB 1000
420 M1$="RANDOM LOCK WRITE":OPEN "test.dat" FOR RANDOM LOCK WRITE AS 1:GOSUB 1000
430 M1$="RANDOM ACCESS READ LOCK WRITE":OPEN "test.dat" FOR RANDOM ACCESS READ LOCK WRITE AS 1:GOSUB 1000
440 M1$="RANDOM ACCESS WRITE LOCK WRITE":OPEN "test.dat" FOR RANDOM ACCESS WRITE LOCK WRITE AS 1:GOSUB 1000
450 M1$="RANDOM ACCESS READ WRITE LOCK WRITE":OPEN "test.dat" FOR RANDOM ACCESS READ WRITE LOCK WRITE AS 1:GOSUB 1000
520 M1$="RANDOM LOCK READ WRITE":OPEN "test.dat" FOR RANDOM LOCK READ WRITE AS 1:GOSUB 1000
530 M1$="RANDOM ACCESS READ LOCK READ WRITE":OPEN "test.dat" FOR RANDOM ACCESS READ LOCK READ WRITE AS 1:GOSUB 1000
540 M1$="RANDOM ACCESS WRITE LOCK READ WRITE":OPEN "test.dat" FOR RANDOM ACCESS WRITE LOCK READ WRITE AS 1:GOSUB 1000
550 M1$="RANDOM ACCESS READ WRITE LOCK READ WRITE":OPEN "test.dat" FOR RANDOM ACCESS READ WRITE LOCK READ WRITE AS 1:GOSUB 1000
999 END
1000 '
1120 M2$="RANDOM":OPEN "test.dat" FOR RANDOM AS 2:GOSUB 9000
1130 M2$="RANDOM ACCESS READ":OPEN "test.dat" FOR RANDOM ACCESS READ AS 2:GOSUB 9000
1140 M2$="RANDOM ACCESS WRITE":OPEN "test.dat" FOR RANDOM ACCESS WRITE AS 2:GOSUB 9000
1150 M2$="RANDOM ACCESS READ WRITE":OPEN "test.dat" FOR RANDOM ACCESS READ WRITE AS 2:GOSUB 9000
1220 M2$="RANDOM SHARED":OPEN "test.dat" FOR RANDOM SHARED AS 2:GOSUB 9000
1230 M2$="RANDOM ACCESS READ SHARED":OPEN "test.dat" FOR RANDOM ACCESS READ SHARED AS 2:GOSUB 9000
1240 M2$="RANDOM ACCESS WRITE SHARED":OPEN "test.dat" FOR RANDOM ACCESS WRITE SHARED AS 2:GOSUB 9000
1250 M2$="RANDOM ACCESS READ WRITE SHARED":OPEN "test.dat" FOR RANDOM ACCESS READ WRITE SHARED AS 2:GOSUB 9000
1320 M2$="RANDOM LOCK READ":OPEN "test.dat" FOR RANDOM LOCK READ AS 2:GOSUB 9000
1330 M2$="RANDOM ACCESS READ LOCK READ":OPEN "test.dat" FOR RANDOM ACCESS READ LOCK READ AS 2:GOSUB 9000
1340 M2$="RANDOM ACCESS WRITE LOCK READ":OPEN "test.dat" FOR RANDOM ACCESS WRITE LOCK READ AS 2:GOSUB 9000
1350 M2$="RANDOM ACCESS READ WRITE LOCK READ":OPEN "test.dat" FOR RANDOM ACCESS READ WRITE LOCK READ AS 2:GOSUB 9000
1420 M2$="RANDOM LOCK WRITE":OPEN "test.dat" FOR RANDOM LOCK WRITE AS 2:GOSUB 9000
1430 M2$="RANDOM ACCESS READ LOCK WRITE":OPEN "test.dat" FOR RANDOM ACCESS READ LOCK WRITE AS 2:GOSUB 9000
1440 M2$="RANDOM ACCESS WRITE LOCK WRITE":OPEN "test.dat" FOR RANDOM ACCESS WRITE LOCK WRITE AS 2:GOSUB 9000
1450 M2$="RANDOM ACCESS READ WRITE LOCK WRITE":OPEN "test.dat" FOR RANDOM ACCESS READ WRITE LOCK WRITE AS 2:GOSUB 9000
1520 M2$="RANDOM LOCK READ WRITE":OPEN "test.dat" FOR RANDOM LOCK READ WRITE AS 2:GOSUB 9000
1530 M2$="RANDOM ACCESS READ LOCK READ WRITE":OPEN "test.dat" FOR RANDOM ACCESS READ LOCK READ WRITE AS 2:GOSUB 9000
1540 M2$="RANDOM ACCESS WRITE LOCK READ WRITE":OPEN "test.dat" FOR RANDOM ACCESS WRITE LOCK READ WRITE AS 2:GOSUB 9000
1550 M2$="RANDOM ACCESS READ WRITE LOCK READ WRITE":OPEN "test.dat" FOR RANDOM ACCESS READ WRITE LOCK READ WRITE AS 2:GOSUB 9000
1600 CLOSE#1:RETURN
9000 '
9010 PRINT#1, "test"
9020 GET#2, 1
9030 PUT#2, 1
9040 LOCK#2, 1
9050 UNLOCK#2, 1
9060 INPUT#1, A$
9090 CLOSE#2:RETURN
10000 OPEN "errors.txt" FOR APPEND AS 3
10050 WRITE#3, M1$, M2$, ERR, ERL
10070 CLOSE 3
10100 RESUME NEXT

