home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. CD ROM (Annual Premium Edition)
/
premium.zip
/
premium
/
IBMOS2_2
/
PMCARDSR.ZIP
/
detect2.prg
< prev
next >
Wrap
Text File
|
1990-09-24
|
938b
|
18 lines
SET ECHO OFF
SET TALK OFF
? "Duplicate Record Key Checker"
ACCEPT "Enter database name: " TO dbn && Input data base name.
USE &dbn && Open data base.
DISP STRU && Display db structure
ACCEPT "Enter field name: " TO fld && Input name of field
INDEX ON &fld TO tempndx && Index data base on field.
DO WHILE .NOT. EOF() && Search through data base.
oldval = &fld && Save field value.
oldrec = recno() && Save record number.
SKIP && Skip to next record.
IF .NOT. EOF() .AND. oldval = &fld
SKIP -1 && Backup to first
DISPLAY &fld WHILE .NOT. EOF() .AND. oldval = &fld && Disp em
ENDIF
ENDDO && Repeat until end file