Faircom c-tree parsing
I am trying to parse a *.dat file for a Faircom c-tree database. I am confused by what to select in the Structured Schema field, as none of the options seems to auto-detect the field names.
Manually Parse gets me some kind of field selection screen against the raw byte data, but I know all the field names and types, and lengths are in the header section of the .dat file, as I can see them in hex editor.
There must be some way to auto generate the metadata for the .dat file i'm missing.
Your transaction secured by high-grade AES-256 encryption.
RE: Faircom c-tree parsing
Hi Tigaris,
If your .DAT file is a C-TREE+ file, with an internal dictionary file called a "Resource File" embedded inside the data file, the Data Parser for C-TREE should be able to read the schema (field and record definitions) because the Data Parser for C-TREE includes support for this internal dictionarytype.
Here are the steps to follow to utilize the internal dictionary support inside the Data Parser for C-TREE:
If you do NOT get an error at this point, proceed with step 4 below.
If you get an error at this point, the file is probably not a C-TREE Plus file and therefore will not contain a valid C-TREE Plus Resource file. If this occurs, go back and select the "plain" C-TREE connector and connect to your data file again. In this case, you will need to manually define the records and fields using the manual parser inside the Data Parser for C-TREE. Follow the steps in the Data Parser documentation to define the records and fields manually.
Hope this helps!
RE: Faircom c-tree parsing
Ok steps 1-3 were fine no error. However there is no option called "C-TREE (Resource) Dictionary" in the Structured Schema drop-down. Is this some kind of optional add-on or a missing feature in the evaluation version?
I am using
ProductName: Pervasive Data Parser for C-TREE Development Seat 1 CPU Single Threaded For Windows, Single User
License TYpe: Time Limited
Version: 8.17.0.2 2007041416
RE: Faircom c-tree parsing
I just confirmed that there is no option to select the C-TREE Resource Dictionary in the Data Parser for C-TREE, and will try to get this resolved and tested within the next 24 hours.
RE: Faircom C-TREE Parsing
Hi Tigaris,
I have found a workaround that should resolve the problem you reported when trying to use the C-TREE PLUS Resource Dictionary in the Data Parser for C-TREE. Follow these steps:
We will continue to work on a resolution to the problem, but this should get you going in the meantime.
Let us know if this works for you, or not.
RE: Faircom C-TREE Parsing
Still having problems. While there were no errors in the above steps, I ended up with a record layout with a single field of type character for entire length of a record. So it didn't pick up any field names.
It does parse the number of records in the file accurately, so obviously the c-tree parsing is working. Perhaps your tool does not support the Record Schema Resource embedded by Faircom in the ctree file.
RE: Faircom C-TREE Parsing
Maybe the file is "plain" C-TREE and not C-TREE PLUS.
Do you know the C-TREE version? I believe the version is included in the (very large) header of C-TREE data files.
Same problems with my C-Tree data files
I have the same problems with my C-TREE files. How do I know which C-TREE version from the .dat file?
BTW, I also have corresponding .idx files with the .dat files.
Thanks.
C-TREE Plus Data and Resource Files
Hi Han,
Thank you for sending me a sample of your C-Tree Plus data and index files. After looking inside the .DAT file, I can see that there is no C-TREE DODA Resource information present. This means you will need to parse the C-TREE data files using the manual parser inside the Data Parser for C-TREE.
The good news is that most of the data in the sample file you sent is character data. And because the Data Parser for C-TREE can auto-parse the file into records, it is relatively easy to see and define the data fields. The data type for the character fields in the sample file is "zstring".
The data type for the packed fields will vary, depending on the kind of data that is stored in each field. In the Data Parser for C-TREE, there is a wide variety of data types that are native to C-TREE formatting, and you will need to do some "trial-and-error" guessing on these fields. One methodology that may help you with the packed data fields is to view your data in the application from which the data originated. In that way you can verify that you have selected the correct data type and data type properties for each field by comparing the data in the Contents box (which displays the unpacked value for the field you are defining) to the data that displays in the user interface of the originating application.
- Jo