Hello,
I want to import an SPSS data set into SAS but my SPSS version of the data set has a password. I assume the reason I cannot import the data successfully is that I did not add the password. I appreciate it if you help me add the password, or if you have other suggestions.
proc import datafile = "&proj_loc\SPSS_data.sav"
dbms = spss replace
out = SAS_data;
run;
Thanks
Hello,
Can you create a SPSS export file (named 'myspss.por') without password?
Then you can import it in the dataset work.temp by means of these 2 pieces of code (anyone out of the 2).
Both pieces of code use the SPSS interface library engine.
filename myfile 'myspss.por';
proc convert spss=myfile out=temp;
run;
OR
libname myfile spss 'myspss.por';
data temp;
set myfile._first_;
run;
I don't have SAS/ACCESS Interface to PC Files installed locally (on my laptop-SAS) so I cannot check the proc import with DBMS=spss.
Cheers,
Koen
The .por file is to be made in SPSS. It's an SPSS export file format.
The PROC CONVERT doesn't accept .sav files, it needs to be a file in the SPSS export file format.
When having this .por file, you can indeed put the full path in between quotes:
filename myfile 'C:\...\myfolder\myspss.por';
Koen
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.