Invalid record type

Discussions about editing and cleaning data
Post Reply
kpeng
Posts: 1
Joined: October 17th, 2012, 10:16 am

Invalid record type

Post by kpeng »

Hello! I've been running a cleaning script on data and I managed to eliminate a bunch of process messages outputted on the CSPro Text Viewer, but there is one error I can't seem to shake. That is the "Invalid Record type". It only shows up for two cases out of about 900 even though the forms themselves look good.

What does the process message mean?

Thanks!
Gregory Martin
Posts: 1796
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Invalid record type

Post by Gregory Martin »

"Invalid Record Type" means that there are records in your data file that have record types that do not match any of the records defined in your dictionary. For example, say you had two records defined in your dictionary: population (record type 1), household (record type 2). If you had data like this:

1<id><data>
1<id><data>
2<id><data>
3<id><data>

The first three lines would get read properly because they match the records defined in the dictionary. The fourth line would result in an "Invalid Record Type" message because there is no record defined in your dictionary with record type 3.

In your edit program, you may want to print out a dummy message for each case in your data file, and then, based on when the "Invalid Record Type" occurs, you can tell where in the data file the invalid record is located. (For example, look at the case IDs of the dummy message right before the "Invalid Record Type" message.) Then look in your data file for these invalid records.

My guess is that your data file has blank lines in it. These will get record as invalid records.
Post Reply