I am having trouble importing a SPSS file in the SAS. The code I am using is: < / P>
proc import datafile = "c: \ sas \ Germany sav." Out = test dbms = sav; Run;
All data is imported, but the problem is that some values of the variable have slightly different names, for example in SPSS file, the value of variable "A" is "KÖL" , But when imported into SAS, it becomes "K-L".
What I'm thinking is this problem may be based on the fact that there are some German words in the SAV file, which SAS can not understand.
Is there an order that loads something in a library or SAS so that it can understand language-specific values?
PS I got a similar position here: But the answer is not really clear. By default, SAS is often the standard windows-Latin-1 codepage, which is often called "ASCII" (incorrect method). From), are used. The SAS itself can handle any encoding, but if it uses Windows-Latin-1 by default, it will not handle some Unicode translations.
If you are using SAS 9.3 or 9.4, and possibly earlier versions of V9, you might have installed a Unicode version of SAS. See in
\ sasFoundation \. 9x \ nls \
There you will probably find "N" (if you are using it English, anyway), which is usually using the default Windows-Latin-1 codepage Used to be. You will also get (possibly, if it was installed) Unicode compatible version. It's really just a configuration setting, but it's important to take them properly that they provide pre-baked config files
In my case I have an "U8" folder under NLS, Which I can use to enable Unicode character encoding on my dataset and while reading data.
A Warning: I do not know how well the SPSS import engine controls Unicode / MBCs characters. This is a different issue; If you run the Unicode version of SAS and there are still problems, then this problem may occur, and you may either need to export your SPSS file differently or talk to SAS tech support.
No comments:
Post a Comment