BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
dbiehle
Calcite | Level 5

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

1 ACCEPTED SOLUTION

Accepted Solutions
dbiehle
Calcite | Level 5

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.

View solution in original post

5 REPLIES 5
Reeza
Super User

Try DBMS=SPSS rather than SAV?

dbiehle
Calcite | Level 5

It's a funny thing, some of the official SAS documentation online specifies using DBMS=SPSS but others specify using DBMS=SAV. I get an error when I specify DBMS=SPSS over DBMS=SAV:

ERROR: DBMS type SPSS not valid for import.

Reeza
Super User

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.

dbiehle
Calcite | Level 5

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.

dbiehle
Calcite | Level 5

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.

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 1796 views
  • 3 likes
  • 2 in conversation