MB Software Solutions,  LLC wrote on 2011-08-09: 
>  How do I determine the # of rows in a fixed-width flat file?  I want to
>  provide a progress update in the loop so I know how much % of the file
>  has been processed.  I'm trying to avoid reading the entire file in with
>  ALINES.  (But I guess maybe I could do that but it seems like too much
>  overhead.)
>  
>  Thanks!
>  --Mike

Mike,

It would be a two pass thing, or a best guess. I would go with the best
guess.
A tight loop getting the data and dumping it as you get a total count, then
return to the top and begin processing.
If you did this, since you have multiple types of data in the file, you
could get a count of each type. Then show the progress of each type as you
do the real processing.

The best guess, FSEEK() to the end returns the total number of bytes. You
can use this and add the bytes of each line to show the complete progress.


Tracy Pearson
PowerChurch Software


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/[email protected]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to