home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Du Jour
/
SoftwareDuJour.iso
/
BUSINESS
/
DBASE
/
VIEWGEN.ARC
/
SAM_PACK.PRG
< prev
next >
Wrap
Text File
|
1985-11-05
|
914b
|
37 lines
* Program.: SAM_PACK.PRG
* Author..: Your Name
* Date....: 11/05/85
* Notice..: Copyright 1985, Your Company, All Rights Reserved
* Version.: dBASE III, version 1.1
* Notes...: PACK program for NAMES.DBF
*
PARAMETER row,tempdbf,origdbf,origndx,origkey
* ---Delete old tempdbf file if it exists.
IF FILE( [&tempdbf] )
DELETE FILE &tempdbf
ENDIF
@ row,0 SAY "Copying " + origdbf + "..."
* ---Copy in order of index file.
SET DELETED ON
SET TALK ON
COPY TO &tempdbf
SET TALK OFF
SET DELETED OFF
* ---Close original file.
USE
* ---Delete original file.
DELETE FILE &origdbf
* ---RENAME tempdbf to original.
RENAME &tempdbf TO &origdbf
* ---USE new original and recreate index file.
USE &origdbf
IF "" <> origndx
@ row,0 CLEAR
@ row,0 SAY "Recreating index " + origndx + "..."
SET TALK ON
INDEX ON &origkey TO &origndx
SET TALK OFF
ENDIF
RETURN
* EOF: SAM_PACK.PRG