Fw: removing mass records

Chris Sellitto sellich at guaranteedreturns.com
Wed Sep 3 06:35:04 PDT 2014


> -----Original Message-----
> From: Filepro-list [mailto:filepro-list-
> bounces+sellich=guaranteedreturns.com at lists.celestial.com] On Behalf Of
> Robert T. Repko
> Sent: Wednesday, September 03, 2014 12:40 AM
> To: filepro-list at lists.celestial.com
> Subject: RE: Fw: removing mass records
> 
> That's okay if you don't want to keep some of the system maintained
> fields such as @cd which copy will change to the date the data was
> copied.
> 
> -----Original Message-----
> From: Filepro-list [mailto:filepro-list-
> bounces+rtr=rsquared.com at lists.celestial.com] On Behalf Of Fairlight
> Sent: Tuesday, September 2, 2014 10:46 PM
> To: filepro-list at lists.celestial.com
> Subject: Re: Fw: removing mass records
> 
> I'd make a duplicate file (or even just qualifier), then write a worm to
> go through and just use COPY on lookups between the two, grabbing all
> non-empty records.  Then move the new version into place.
> 
> m->
> 
> On Tue, Sep 02, 2014 at 03:56:38PM -0400, Dave Rottkamp thus spoke:
> >
> >
> >
> > Hi
> >
> >   I wanted to ask what is the best way to remove mass records from a
> database
> >   in older version filepro, index would break down and process would
> hang.
> >
> >   I want to make a routine that would delete records based on age,
> without having to
> >   1) remove indexes
> >   2) select records (which than takes forever)
> >   3) remove records
> >   4) copy back indexes and rebuild them
> >
> >   as this leaves blanks in the file
> >   I have also in past used to
> >
> >   1) copy good records to qualified key
> >   2) copy qualified key over key
> >   3) rebuild indexes
> >
> >   problem is if this breaks in the middle I could have a corrupt key
> > file with very few records
> >
> >   does any one have a better way of deleting mass records and not
> > leaving blanks in the file
> >
> >
> >   Thanks,
> >
> >   Dave Rottkamp
> >   Cell 570-620-8027
> >
> >   www.poconolakeproperties.com
> >
> >

In regards to the system maintained dates, what we do is an archive off hours.  We create a copy of the file we are working with (or a qualified file if that works better for you), then we copy the records we want to keep in this new "TEMP" file, and put the records we want to archive into a "HISTORY" file.  However, before we write any records we, save the current date in a global dummy variable, then change the system date to that of the @cd date, this way it retains that system variable when it is written, and then change it back to the date we saved in our dummy variable.  Again, this works best when done off hours if that is possible.  Oh yeah, we then rename the original file to something different, and also rename the new "TEMP" file back to what the original file name was, and now you have a fresh new file with only the records you need current (re-index as needed).

Hope this helps.

Christopher Sellitto
Senior Programmer/Analyst
Guaranteed Returns(r)
100 Colin Drive
Holbrook, NY 11741
H:1-800-473-2138, ext. 132



More information about the Filepro-list mailing list