So this has worked, mostly, with one remaining problem.
To recap, I created a new field, I called it CONTROL, consisting of site concatenated with date, as a string, and then made that field key unique and no entry. With the key unique inactivated temporarily, (and with the enter key taped down!) I was able to populate CONTROL for all 12,100 records. And prospective entry of new records works--the CONTROL field is populated.
But when I reactivate, in the chk file, the key unique requirement for CONTROL, I can't open the .rec file for entering new data. I get an error message that CONTROL is duplicated between two records (roughly records 2700 and 2701, or thereabouts.) And the file won't load any further. I can see how this is happening; those are probably the first two duplicate records in the file. I'm not surprised, but it does present a problem.
Now this is even more interesting: if I write down the two records cited in the error message about duplicate values on CONTROL, then inactivate the key unique requiremnt, then open the file successfully, then mark one of the DEL (deleted), save the file, exit EpiData, then reactivate the key unique requirement, then try to reopen the file for data entry, I get the exact same error message: those same two records are cited as duplicated on CONTROL, even though one of them is now marked DEL.
Puzzled.
--Chris Christopher W. Ryan, MD SUNY Upstate Medical University Clinical Campus at Binghamton 425 Robinson Street, Binghamton, NY 13904 cryanatbinghamtondotedu
"If you want to build a ship, don't drum up the men to gather wood, divide the work and give orders. Instead, teach them to yearn for the vast and endless sea." [Antoine de St. Exupery]
epidata-list@lists.umanitoba.ca wrote:
Just an extension to previous mail: The principle I described should work, but extend the system replacing site or clinic with date. To get all the old data recoded (the following is not a nice way, but works): 0. turn off the "key unique in fldcontrol" 1 a. go to record 1. b. press and hold enter key down until you have been through all records
- this will recode the control field in existing data. (sometimes I put
a pencil in the keyboard to lock the enter key). 2 turn on the "key unique" in fldcontrol 3 you should be working allright.
regards Jens Lauritsen
EpiData-list mailing list EpiData-list@lists.umanitoba.ca http://lists.umanitoba.ca/mailman/listinfo/epidata-list