08-12-2022, 06:08 PM
(08-11-2022, 05:31 PM)G43 Wrote: sorry it has taken me so long to get back here. Things have been crazy the last couple of months and i havent had time to get back to it. Here is where it is called in the program.
1310 CMND$=",Y,2" : GOSUB 56000
CMND$=",O,PRICHIST.KEY,1" : GOSUB 56000
OPEN "PRICHIST.DAT" FOR RANDOM ACCESS READ WRITE SHARED AS #7 LEN=61
FIELD 7, 18 AS LNPT$, 6 AS INV$, 8 AS DAT$, 25 AS NME$, 4 AS QUAN$ : RETURN
'--------------- Main CALL to FASBP ---------------------------
56000 CALL FABSMB(CMND$,ERRF%,RECNO%,ADRKEY%):RECLOW!=RECNO%
56010 IF RECLOW!< 0 THEN RECLOW!=RECLOW!+65536!
CALL FABSMB("X",DUM%,RECNO%,DUM%):RECHI!=RECNO%
IF RECHI!< 0 THEN RECHI!=RECHI!+65536!
RECNO!=RECHI!*65536+RECLOW!
56020 RETURN
If you describe some line of your program that uses the "S" command (search for exact key) or the command "G" (search for part of the key) it could guess which of the data is the key by which they are sorted.
Similar to this...
KEY$="ARTICLE"
CMND$=",S,KEY$,1,1" : GOSUB 56000
IF there is any line in which the "C" command is used, there we can see the type, length and number of keys that the database has and I could write you a small program that will create a new key file because it is Of course the current one is broken.