Getting an encoding error when importing an SPSS (.SAV) dataset that I can not figure out how to solve. Code and Log:
options MSGLEVEL=I;
proc import datafile= &originalfile dbms=sav out=x replace; run;
NOTE: VARCHAR data type is not supported by the V9 engine. Variable ID has been converted to CHAR data type. NOTE: VARCHAR data type is not supported by the V9 engine. Variable STUDY has been converted to CHAR data type.
When I look at a print of the data, the problem becomes clear: there is some encoding error happening that is messing up the line feed. The first observation of data looks correct, but the second observation has an empty value for ID (first character variable), and the first numeric variable (age) is 6.0134E-154 instead of a normal age in the first observation, like 19, and the person's age looks like it's showing up in the next numeric variable. This pattern continues through the next observation, so that the plausible age keeps moving over to the next variable, creating a diagonal down and to the right pattern of where age is. Hopefully that makes sense, would be easier to show, but the data is confidential. So this is an issue of encoding mismatch causing a line feed error, however I can find no information online as to how to force the dataset (which, remember, is a .sav not a sas7bdat) and the SAS session to have the same encoding.
Does anyone have any ideas how to solve this?
... View more