parsing key file

Fairlight fairlite at fairlite.com
Wed May 26 04:55:40 PDT 2021


No, no you didn't.

You're overlooking the fact that ***you do not want to read the entire
file into RAM at once***.  That's a fast way to exhaust up to 2GB on
32-bit systems, more on 64-bit systems.  Consider your system resources.

There's a reason it was never done that way in the first place.

m->


On Tue, May 25, 2021 at 02:54:43PM -0400, Jose Lerebours via Filepro-list thus spoke:
> lol - Did we just gave birth to a potential web based report writer for
> filePro?
> 
> I mean, once data is loaded to array, one can do whatever you want,
> including, but
> not limited to, search, sort, edit ...  Oh, wait, edit is not "bueno" since
> replacing
> blocks of data in "key" will not necessarily rebuild automatic indexes.
> 
> Well, at least for reporting purposes (provided it is just a straight dump
> not involving
> math or header/detail scenario).
> 
> 
> On 5/25/21 2:34 PM, Bill Campbell via Filepro-list wrote:
> > It's been decades since I had to do this.  I don't remember the
> > details of the 40 character header other than the first character
> > indicates whether the record is active or has been deleted.
> > 
> > Beyond that, the key (and data) records have no delimiter
> > separating the records, but are fixed length.  The key records
> > are 40 + length of all fields so require reads of explicit
> > length.  In python this might be:
> > 
> > fh = open('pathtokeyfile', 'rb')
> > n = 20 + reclength
> > for rec in fh.read(n):
> > 	hdr = rec[0:20]
> > 	data = rec[20:]
> > 	...
> > 
> > On Tue, May 25, 2021, Jose Lerebours via Filepro-list wrote:
> > > Can anyone tell me what is the BOR or EOR markers?
> > > 
> > > I could save time if I know exactly what the first 40 or characters are or if
> > > there is a delimiter/marker I can reference to split the segments.
> > > 
> > > I put together sa simple script but it turns out that there is more to it
> > > than I thought - Got to do some coding on some other stuff but I will
> > > come back to this in a few ...  hope you guys have an answer for me by then!
> > > 
> > > Thanks,
> > > 
> > > -- 
> > > 
> > > https://www.asisuites.com
> > > https://www.helpsuites.com
> > > 
> > > _______________________________________________
> > > Filepro-list mailing list
> > > Filepro-list at lists.celestial.com
> > > Subscribe/Unsubscribe/Subscription Changes
> > > http://mailman.celestial.com/mailman/listinfo/filepro-list
> > Bill
> -- 
> 
> 
> https://www.asisuites.com
> https://www.helpsuites.com
> 
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> Subscribe/Unsubscribe/Subscription Changes
> http://mailman.celestial.com/mailman/listinfo/filepro-list
> 

-- 
Audio panton, cogito singularis.


More information about the Filepro-list mailing list