Started with the following file:
CASE.DBF 20,248 KB
Ran the following FoxPro 2.6 DOS:
============================================
SELECT A
?
?'CASE FILE <====='
?
USE
** Perform the equivalent of a PACK
** get UNIQUE record number for a record
** use a modified sys(3) since sys(3) may not be UNIQUE on a 486
lcFile = SUBSTR(SYS(3), 4, 4) + SUBSTR(SYS(2015), 7, 4)
lcFile_dbf = lcFile + ".DBF"
lcFile_fpt = lcFile + ".FPT"
USE CASE EXCLUSIVE
COPY TO (lcFile) FOR !DELETED()
USE
ERASE CASE.DBF
IF FILE('CASE.FPT')
ERASE CASE.FPT
ENDIF
RENAME &lcFile_dbf TO CASE.DBF
IF FILE('&lcFile_fpt')
RENAME &lcFile_fpt TO CASE.FPT
ENDIF
USE CASE EXCLUSIVE
DELETE TAG ALL
INDEX ON DELETED() TAG DELETED
INDEX ON CASE_CODE TAG CASE_CODE
INDEX ON CASE_CODE TAG CASE FOR .NOT. DELETED()
INDEX ON ATTORNEY + CASE_CODE TAG CASEATTY FOR .NOT. DELETED()
USE
=========================================================
Got the following CDX file
CASE.CDX 29,304 KB
Then deleted the CDX, moved the "DELETE TAG ALL" up to a new location
as follows and ran the program again.
============================================
SELECT A
?
?'CASE FILE <====='
?
USE
** Perform the equivalent of a PACK
** get UNIQUE record number for a record
** use a modified sys(3) since sys(3) may not be UNIQUE on a 486
lcFile = SUBSTR(SYS(3), 4, 4) + SUBSTR(SYS(2015), 7, 4)
lcFile_dbf = lcFile + ".DBF"
lcFile_fpt = lcFile + ".FPT"
USE CASE EXCLUSIVE
DELETE TAG ALL && new location
COPY TO (lcFile) FOR !DELETED()
USE
ERASE CASE.DBF
IF FILE('CASE.FPT')
ERASE CASE.FPT
ENDIF
RENAME &lcFile_dbf TO CASE.DBF
IF FILE('&lcFile_fpt')
RENAME &lcFile_fpt TO CASE.FPT
ENDIF
USE CASE EXCLUSIVE
INDEX ON DELETED() TAG DELETED
INDEX ON CASE_CODE TAG CASE_CODE
INDEX ON CASE_CODE TAG CASE FOR .NOT. DELETED()
INDEX ON ATTORNEY + CASE_CODE TAG CASEATTY FOR .NOT. DELETED()
USE
=========================================================
Got the following CDX file
CASE.CDX 1,244 KB
Question:
Why the big size change? Will both work?
OS: WIN2k on 300+ machines with wide range of CPU speeds.
Thanks..
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement