BUTIL and Counting Records 
Author Message
 BUTIL and Counting Records
Any ideas on how to count the number of records for a few hundred btrieve
files ?

(I'm running P.SQL 7, ... I've looked at using BUTIL -STAT ...  but this
tells me a lot of extra info, and I'm really just looking for a list of my
files with the number of records they contain.)

Any help would be greatly appreciated.

Thanks,
Mike Kavander



Sat, 13 Oct 2001 03:00:00 GMT
 BUTIL and Counting Records

Certainly.  First, make a batch file which calls BUTIL -STAT for each file,
outputting the data to a text file.  It should look like this:
BUTIL -STAT file1.btr  >>output.txt
BUTIL -STAT file2.btr  >>output.txt
BUTIL -STAT file3.btr  >>output.txt
etc.

Then, with the resulting file, do a GREP against the file, looking for the
number of records line item, and specifying enough prior lines to catch the
file name.

There are other ways, using many of the utilities I've built over the years,
and I can create the above batch file in less than 30 seconds with some neat
text processing utils.  Then, I can remove the extraneous lines from the text
file with a few more -- but this is because I have to do it a lot.

If you have to repeat this process a lot -- then it is far easier to write a
program to loop through the files and issue the Btrieve STAT calls, collecting
the results.  Wouldn't take much more than about 1-2 hours to write -- let me
know if you would like help doing so!
 Goldstar Software Inc.
 Building on Btrieve(R) for the Future(SM)
 Bill Bach

 www.goldstarsoftware.com
 *** Btrieve/Pervasive.SQL Service & Support Class ***
 June 9-11, 1999
 *** Pervasive.SQL Programming Class ***
 June 16-18, 1999
 See our web site for full details!

Quote:

> Any ideas on how to count the number of records for a few hundred btrieve
> files ?



Sat, 13 Oct 2001 03:00:00 GMT
 BUTIL and Counting Records
Programming, you can use code 15 and use only the record length in the
structure to make a report.
Very easy to do.


Sun, 14 Oct 2001 03:00:00 GMT
 
 [ 3 post ] 

 Relevant Pages 

1. using SELECT COUNT(*) to count distinct records

2. Counting records with Count(*) AS

3. combining records and determining record count

4. Counting Records in Table not Connected to Records in Another (SQL Newbie)

5. counting record only when field value is not equal to value of previous record

6. counting records only when value is different than previous record (MSSQL 2000)

7. FMP5 Record Count of Found Record

8. BUTIL -INDEX

9. windows 2000 server and DOS butil

10. butil.exe error on win2k machine

11. Newbie: BUTIL and VB

12. butil


 
Powered by phpBB® Forum Software