Reading a csdb file using a different dictionary

Other discussions about CSPro
Forum rules
New release: CSPro 8.0
Post Reply
AriSilva
Posts: 591
Joined: July 22nd, 2016, 3:55 pm

Reading a csdb file using a different dictionary

Post by AriSilva »

Earlier, when dealing with dat files, it was possible to have two dcf files to read the same dat. For example, in a dwelling / household / person structure, it was possible to have a dictionary where the case id was dwelling and household, and another dictionary where the case id was only the dwelling. In this scenario, using the second dictionary, it was possible to check if the dwelling had more than one household without having to work with a three level structure. The first dictionary was the "regular" one for all the programs that did not have to work with a multiple household in a dwelling.
But now, with the csdb files, that kind of strategy is compromised, since I do not know how to read a csdb file created with a dictionary and "force" it to accept another one, even if the difference was in the case id (and, of course, in the number of maximum records).
Is there a way to circumvent this problem without having to return to the dat file?
I´m asking that because I have another situation where this approach of using a different dcf might be helpful: I have different questionnaires with a common part of the case key and I wanted to have them in memory at the same time, and decide which questionnaire I want to drop. For example:
quest 1 has the following id xxxxxxxxxxxxx yy1
quest 2 has the following id xxxxxxxxxxxxx yy2
By using a dcf where the case key is only the xxxxxxxxxxxxxx part I would be able to have both questionnaires in memory, even if the file was created using the whole key.
Or do you have another solution for this kind of problem?
Best
Ari
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Reading a csdb file using a different dictionary

Post by josh »

The csdb file doesn't support changing dictionaries. Your best bet is to convert to text, do whatever operations you want, and then convert back to csdb if needed.

We are working on a feature that would let you load two cases from the same dictionary at the same time and compare their contents. That might be useful the situation you outlined but it won't be ready until later this year.
Post Reply