Page 1 of 1

saving csdb as dat generates out of order records

Posted: November 13th, 2025, 12:31 pm
by AriSilva
Hi folks,
I´m using the dataviewet to save the original file as a .dat file.
Apparently it works well, but one of the questionnaires is written at the end of the .dat file.
I´ve written a batch program that does nothing, just to read the file and write the file. Same thing.
Best
Ari

Re: saving csdb as dat generates out of order records

Posted: November 14th, 2025, 9:01 am
by Gregory Martin
When you say "questionnaires" are you talking about cases or records?

Both of the operations that you mention should write the cases to the text data file in sequential (not indexed) order. For each case, the records should be written out in the order that the records are defined in the dictionary.

Is this not what you are seeing?

Re: saving csdb as dat generates out of order records

Posted: November 20th, 2025, 8:45 am
by AriSilva
I´m sorry, the message was not clear.
I mean that a single questionnaire (with several records) is written out of order, at the end of the file.
Best

Re: saving csdb as dat generates out of order records

Posted: December 1st, 2025, 7:44 am
by Gregory Martin
That is odd. I've never heard of a single case being written out of its sequential order, so my guess is that something else is going on. If your data is public, you can share it with cspro@lists.census.gov and we can look into this.