Non-exsisting variables added by SAS using proc import

Reply
New Contributor
Posts: 3

Non-exsisting variables added by SAS using proc import

Hi,

 

When I import a SPSS file into SAS (9.2), SAS creates his own variables which don't exsist in the SPSS file. For example, variabele q20_a is imported and than SAS adds the variable q20_A0 into the dataset. I checked the variable Q20_A0 and it doesn't have any values. Does anyone know why SAS creates these non-existing variables and how I could stop this? Thank you!

 

SAS code used:

proc import out=data1

datafile = "blbla\klklkl.sav"

dbms = SAV replace;

run;

 

Super User
Posts: 9,875

Re: Non-exsisting variables added by SAS using proc import

Maybe these variables are really existed ,but just hidden like Excel did.

Drop them at SPSS side and import again.

New Contributor
Posts: 3

Re: Non-exsisting variables added by SAS using proc import

I checked this, but there are no hidden variables. Also, I imported the .sav file into excel and in this case these 'non-existing' variables were not present in the excel file.
Super User
Posts: 11,134

Re: Non-exsisting variables added by SAS using proc import

Is Q20_a supposed to be a text field? Sometimes people enter values such as horizontal or vertical TAB, LineFeed, CarriageReturn characters that along the way to interchanging data create "false" variables because one or more tools treated the odd character as a delimeter.

 

The very first project I worked on in SPSS had this phantom variable issue and was traced back to less-than-ideal data entry practices. 

New Contributor
Posts: 3

Re: Non-exsisting variables added by SAS using proc import

Yes it does! Thank you for the answer
Ask a Question
Discussion stats
  • 4 replies
  • 244 views
  • 0 likes
  • 3 in conversation