Learning SAS? Welcome to the exclusive online community for all SAS learners.

Importing SPSS file(shift-jis coding) to SAS University Edition

Reply
New Contributor
Posts: 3

Importing SPSS file(shift-jis coding) to SAS University Edition

Hi, I tried to import spss file(.sav), of which encoding is done by shift-jis.

However, code written under might seem work, but SAS university edition continues to be processing and does not return results.

/* SAS code*/

filename a '/folders/myfolders/data/JGSS2010.sav' encoding='Shift-Jis';

proc import datafile=a out=JGSS2010 dbms = sav replace;

run;

/ends here/

Is there any way to solve this problem?

Super User
Posts: 11,343

Re: Importing SPSS file(shift-jis coding) to SAS University Edition

Posted in reply to MinoruYagishita

Have you tried DBMS=SPSS?

New Contributor
Posts: 3

Re: Importing SPSS file(shift-jis coding) to SAS University Edition

Thank you for your suggestion.

However, this code,

/*SAS code*/

filename a '/folders/myfolders/data/JGSS2010.sav' encoding='Shift-Jis';

PROC import out=WORK.JGSS2010

        Filie=a

        DBMS=SPSS Replace;

Run;

/*ends here*/

also does not return result at least after 3 minutes.

SAS University Edition is still executing the process and does not respond.

Frequent Contributor
Posts: 136

Re: Importing SPSS file(shift-jis coding) to SAS University Edition

Posted in reply to MinoruYagishita

Hi Minoru.

I sometimes have difficulties when attempting to load practical, current and motivating data examples for my students. I wonder if this is what prompted your problem?

Can you attach a small SPSS .data set encoded as shift-jis in sav file format to a post without exposing confidential participant information, so we can try some solutions?

Cheers.

Damien

New Contributor
Posts: 3

Re: Importing SPSS file(shift-jis coding) to SAS University Edition

Posted in reply to Damien_Mather

Hi, you can find data, which I am trying to import, on

GESIS(https://dbk.gesis.org/dbksearch/sdesc2.asp?no=5352&db=e&doi=10.4232/1.11594) or

ICPSR(http://www.icpsr.umich.edu/icpsrweb/ICPSR/studies/34623).

I use encoding='shift-jis' for reading .txt file, which is encoded by shift-jis and it worked.

Currently, I do not have SPSS, so I cannot upload part of my data.

You can try by finding the data on the link above.

I also try importing a Stata file with shift-jis option, but SAS University Edition does not respond.

Ask a Question
Discussion stats
  • 4 replies
  • 539 views
  • 0 likes
  • 3 in conversation