1 PRINT\PRINT "FILE ACCESS PROGRAM";TAB(70);"4/20/78"\PRINT 2 DIM R$(80),S$(80) 3 X=0 10 PRINT "Input Filename ";\INPUT F$ 20 PRINT "Record Length ";\INPUT L 25 R=0\ K=-1 30 FILE#1:F$,L 35 DEFINE#1:L 37 IF X<>0 GOTO 40\ GOSUB 700\ X=1 39 REM --------------------------------------------------------- 40 PRINT\PRINT "# ";\INPUT R$ 50 IF R$<>"" GOTO 55\ R=K+1\ GOTO 100 55 C$=SEG$(R$,1,1) 60 IF C$<>"P" GOTO 64\ R=K-1\ IF R>=0 GOTO 100 61 PRINT " Beginning of File Encountered"\ R=0\ GOTO 140 64 IF C$="." GOTO 130 65 IF C$<>"N" GOTO 70\ PRINT "RECORD # ";R\ GOTO 40 70 IF C$<>"H" GOTO 75\ GOSUB 700\ GOTO 40 75 IF C$<>"L" GOTO 80\ CLOSE#1\ GOTO 20 80 IF C$<>"F" GOTO 85\ CLOSE#1\ GOTO 10 85 IF C$="Q" GOTO 900 89 IF R$>="0" GOTO 90\ R$=R$*"-1" 90 R=VAL(R$) 100 GET#1:R,S$ 120 IF END#1 GOTO 600 130 PRINT S$ 140 K=R 150 GOTO 40 600 RESTORE#1 610 R=0\ K=-1 620 GOTO 40 700 PRINT\ PRINT 710 PRINT "In response to the '# ?' prompt, enter one of the following:"\PRINT 720 PRINT ,"nnnn","Desired Record Number" 730 PRINT ,"","Next Sequential Record" 735 PRINT ,".","Repeat this Record" 740 PRINT ,"P","Previous Record" 750 PRINT ,"N","Display Currently Selected Record #"\PRINT 760 PRINT ,"L","Select new Record Length" 770 PRINT ,"F","Select new Data Filename"\PRINT 780 PRINT ,"H","HELP (Repeat These Instructions)" 790 PRINT ,"Q","Quit"\ PRINT\ PRINT 799 RETURN 900 CLOSE#1 999 END