Another paper that explains what you are trying to do can be found here:
www.goldstarsoftware.com/p
Get the paper on Accessing Btrieve Files from ODBC, which is the same thing.
What I can tell you about your file is that the record length is fixed at 78 bytes each. Of those bytes, the following fields can be seen:
Position Length Type
1 3 String
4 3 String
7 1 String
8 6 String
14 6 String
Beyond that, we have to guess a bit, but I see a 10-byte string next, followed by a 1-byte string, then perhaps two four-byte COBOL DECIMAL fields. The last 40 bytes are looking like string fields, but the data is pretty sparse, so it's hard to tell.
As the article shows, you then only need to give these fields good names, then build the DDF's, and you're home free. The DDF Builder provided with PSQLv10 or BTSearch are both good options.
Main Topics
Browse All Topics





by: mirtheilPosted on 2009-07-29 at 12:23:54ID: 24973627
A few questions:
ataxtracti on.asp).
- Do you know the exact record structure of the table?
- Do you have DDF files (FILE.DDF, FIELD.DDF, INDEX.DDF)?
- Is this a one time or continuing process?
- WHat version of Btrieve/PSQL do you have installed?
A few suggestions:
- If you have DDFs, use them with ODBC to read the data. There are a number of tools that can export data through ODBC to CSV (or any number of formats) including my own DataXtraction (http://www.mirtheil.com/d
- If you don't have DDFs but know the record structure, you can either create DDFs using a number of tools (Pervasive COntrol Center, BTSearch, etc) or create a program using the Btrieve API and write the data to CSV.
- You will need an engine in order to read the data file. I recommend the PSQL v10 engine. It's current and runs on several platforms.