Print "Chain file missing return to main menu. C/R to Recover."
Wait Key
Goto EX_PROG
End If
Open In 9,"RAM:DBMCHAIN.DAT"
Input #9,FILENAME$
Close 9
'
Open Out 9,"RAM:DBMLINK.DAT"
Print #9,"By pass the select database option. Database - ";FILENAME$
Close 9
'
Gosub OPEN_FILES
'
' open Temp data file
'
FILNAM$=FILENAME$+"TMP"
Open Random 8,FILNAM$
Field 8,A As AA$,B As BB$,C As CC$,D As DD$,E As EE$,F As FF$,G As GG$,H As HH$,I As II$,J As JJ$,K As KK$,L As LL$,M As MM$,N As NN$,O As OO$,P As PP$,Q As QQ$,R As RR$,S As SS$,T As TT$
Field 1,30 As DBNAME$,6 As DBUSE$,6 As DBDEL$,2 As SYSSEARCH$,8 As CREATEDATE$,6 As COUNT$,6 As MENU1PW$,6 As MENU2PW$,6 As MENU3PW$,6 As MENU4PW$,6 As MENU5PW$,6 As IDXMAX$,2 As FLD_USE$,8 As DBM_VERSION$
Field 2,20 As FLDN$,3 As FLDL$,10 As FLRPW$,10 As FLWPW$,21 As FLFILLER$
For LP=1 To 50
Get 2,LP
DBFN$(LP)=FLDN$
DBFL$(LP)=FLDL$
DBRPW$(LP)=FLRPW$
DBWPW$(LP)=FLWPW$
Next LP
For LP=1 To 50
If DBFL$(LP)="" : DBFL$(LP)="1" : End If
Next LP
A=Val(DBFL$(1))
B=Val(DBFL$(2))
C=Val(DBFL$(3))
D=Val(DBFL$(4))
E=Val(DBFL$(5))
F=Val(DBFL$(6))
G=Val(DBFL$(7))
H=Val(DBFL$(8))
I=Val(DBFL$(9))
J=Val(DBFL$(10))
K=Val(DBFL$(11))
L=Val(DBFL$(12))
M=Val(DBFL$(13))
N=Val(DBFL$(14))
O=Val(DBFL$(15))
P=Val(DBFL$(16))
Q=Val(DBFL$(17))
R=Val(DBFL$(18))
S=Val(DBFL$(19))
T=Val(DBFL$(20))
'
' open data file
'
FILNAM$=FILENAME$+"D"
Open Random 3,FILNAM$
Field 3,A As A$,B As B$,C As C$,D As D$,E As E$,F As F$,G As G$,H As H$,I As I$,J As J$,K As K$,L As L$,M As M$,N As N$,O As O$,P As P$,Q As Q$,R As R$,S As S$,T As T$
'
'Open Index file
'
If Val(SYSSEARCH$)=1 : STORE$=A$ : STORE_VALUE=A : End If
If Val(SYSSEARCH$)=2 : STORE$=B$ : STORE_VALUE=B : End If
If Val(SYSSEARCH$)=3 : STORE$=C$ : STORE_VALUE=C : End If
If Val(SYSSEARCH$)=4 : STORE$=D$ : STORE_VALUE=D : End If
If Val(SYSSEARCH$)=5 : STORE$=E$ : STORE_VALUE=E : End If
If Val(SYSSEARCH$)=6 : STORE$=F$ : STORE_VALUE=F : End If
If Val(SYSSEARCH$)=7 : STORE$=G$ : STORE_VALUE=G : End If
If Val(SYSSEARCH$)=8 : STORE$=H$ : STORE_VALUE=H : End If
If Val(SYSSEARCH$)=9 : STORE$=I$ : STORE_VALUE=I : End If
If Val(SYSSEARCH$)=10 : STORE$=J$ : STORE_VALUE=J : End If
If Val(SYSSEARCH$)=11 : STORE$=K$ : STORE_VALUE=K : End If
If Val(SYSSEARCH$)=12 : STORE$=L$ : STORE_VALUE=L : End If
If Val(SYSSEARCH$)=13 : STORE$=M$ : STORE_VALUE=M : End If
If Val(SYSSEARCH$)=14 : STORE$=N$ : STORE_VALUE=N : End If
If Val(SYSSEARCH$)=15 : STORE$=O$ : STORE_VALUE=O : End If
If Val(SYSSEARCH$)=16 : STORE$=P$ : STORE_VALUE=P : End If
If Val(SYSSEARCH$)=17 : STORE$=Q$ : STORE_VALUE=Q : End If
If Val(SYSSEARCH$)=18 : STORE$=R$ : STORE_VALUE=R : End If
If Val(SYSSEARCH$)=19 : STORE$=S$ : STORE_VALUE=S : End If
If Val(SYSSEARCH$)=20 : STORE$=T$ : STORE_VALUE=T : End If
If Val(SYSSEARCH$)<1 or Val(SYSSEARCH$)>20 : STORE$=A$ : STORE_VALUE=A : End If