Howdy.
I currently import SPSS data using LIBNAME statements with POR files. This has been a perfectly usable method for my work as it pulls in all of the data for all of the records/observations, the variable names and labels, and the values. Example:
LIBNAME data1 SPSS "C:\data\example.por";
DATA impdatatest;
SET data1._FIRST_;
RUN;
However, I'd like to import the value labels as well without going through a long PROC FORMAT / PROC DATASETS method. PROC IMPORT can import SAV files pulling in the data for all of the records/observations, variable names and labels, and value names and labels, but I can't get the procedure to register all of the variables from the SPSS file. My example SAV file includes 402 variables, but only the first 146 are being imported.
PROC IMPORT DATAFILE="C:\data\example.sav"
OUT=impdatatest
DBMS=SAV
REPLACE;
RUN;
Are there limits to the number of variables that PROC IMPORT can import from SPSS files or does anyone know of a workaround to this issue?
Thank you in advance for your help.
Regards,
Drew
Tech Support did indeed help solve this issue for me.
For anyone else looking for a solution to this problem, I needed to upgrade from SAS 9.1.3 Service Pack 3 to SAS 9.2 or SAS 9.3 to get all of the variables and labels to import from the SPSS file. Short of that, since someone else at my company is in charge of upgrading our SAS version, I was able to download Service Pack 4 for SAS 9.1.3
http://ftp.sas.com/techsup/download/hotfix/e9_sbcs_prod_list.html#h0
followed by a hot fix to the SAS/ACCESS issue:
http://ftp.sas.com/techsup/download/hotfix/e9_win_sbcs.html#pf
Thanks again for your help, Reeza and, in SAS Tech Support, Peter Ruzsa.
Try DBMS=SPSS rather than SAV?
That's a bug
http://support.sas.com/kb/37/249.html
No idea on your original problem then, contact tech support is probably my guess. The biggest SPSS file I have has 137 col, so less than your problem.
Okay, thanks, Reeza.
I will contact SAS tech support; I was just throwing this out to the community first since I couldn't find anything online about limits.
Tech Support did indeed help solve this issue for me.
For anyone else looking for a solution to this problem, I needed to upgrade from SAS 9.1.3 Service Pack 3 to SAS 9.2 or SAS 9.3 to get all of the variables and labels to import from the SPSS file. Short of that, since someone else at my company is in charge of upgrading our SAS version, I was able to download Service Pack 4 for SAS 9.1.3
http://ftp.sas.com/techsup/download/hotfix/e9_sbcs_prod_list.html#h0
followed by a hot fix to the SAS/ACCESS issue:
http://ftp.sas.com/techsup/download/hotfix/e9_win_sbcs.html#pf
Thanks again for your help, Reeza and, in SAS Tech Support, Peter Ruzsa.
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.