As I am new to SAS I am having trouble to import spss data into sas using the "proc import" command. The code I was using:
proc import datafile = "C:\Users\spss.sav"
out=work.test
dbms = sav
replace;
run;
The main problem is that when imported to sas, the datatable variables have the values and not the coding. So for instance if the variable "Gender" is coded 1=male 2=female, each observation in sas has "female" or "male".
Now according to here:
if the following code is added after the code above, then this problem ceases to exist:
proc datasets;
modify my_dataset;
format _all_;
quit;
What still remains is that the Variable names from spss, instead of having their name, when imported to sas they have the labels that are assigned in spss. Is there any command that can keep the Names of the variables in SAS, instead of the SPSS labels?
if q1=1 then ...
it would work. The value labels (formats) are solely cosmetic (and same with the variable labels). – Joe