Reformatting dictionary multiplying IDs
Posted: March 6th, 2023, 3:33 pm
Hi folks,
The general problem is the following:
I have a dictionary where the cases are identified by segment, vivienda (building) and hogar (household), And the record key is defined AFTER de id fields, as shown in the attached dictionary (RDCenso22.dcf), That is, each case is a household
By the way, I´m trying to help the Dominican Republic census, and this dictionary was built for the data entry people before my "arrival" in the picture.
As a building can have more than one household, I would like to have a file where the case was the building, as in the attached dictionary (RDCenso22_Vivienda.dcf). I just cpoied the PHOGAR field outside the _IDSO to all the record types, and removed it from the _IDSO.
The idea was to use the Reformat utility to copy the data from the original file (household case) to an output file where the case is identified by the building (vivienda).
But, as I realized later, the reformat just copies fields with the same names, so, the PHOGAR was deleted, and the PHOGAR1, PHOGAR2, etc are blanks.
I used to do that very easily where the record key was the first field in the dictionary, and where the data file where a .DAT (text) file. So, it was just a problem of having two dictionaries pointing to the same file.
But now, besides doing a copy field by field (or creating group fileds to help copying), I do not know how to do that.
Best
Ari
The general problem is the following:
I have a dictionary where the cases are identified by segment, vivienda (building) and hogar (household), And the record key is defined AFTER de id fields, as shown in the attached dictionary (RDCenso22.dcf), That is, each case is a household
By the way, I´m trying to help the Dominican Republic census, and this dictionary was built for the data entry people before my "arrival" in the picture.
As a building can have more than one household, I would like to have a file where the case was the building, as in the attached dictionary (RDCenso22_Vivienda.dcf). I just cpoied the PHOGAR field outside the _IDSO to all the record types, and removed it from the _IDSO.
The idea was to use the Reformat utility to copy the data from the original file (household case) to an output file where the case is identified by the building (vivienda).
But, as I realized later, the reformat just copies fields with the same names, so, the PHOGAR was deleted, and the PHOGAR1, PHOGAR2, etc are blanks.
I used to do that very easily where the record key was the first field in the dictionary, and where the data file where a .DAT (text) file. So, it was just a problem of having two dictionaries pointing to the same file.
But now, besides doing a copy field by field (or creating group fileds to help copying), I do not know how to do that.
Best
Ari