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

Can't recognize Chinese value

Reply
New Contributor
Posts: 2

Can't recognize Chinese value

After importing a SPSS file with Chinese value, I tried to convert Chinese value to Numeric one. My code is as below,

 

Environment: SAS Studio

ENCODING=UTF-8 

 

data final2;
set final;
if A4='男性' then gender=1;
else if A4='女性' then gender=2;
else gender=3;
keep A4 gender;
run;

 

However, it doesn't work at all, please check the screen shot. Thanks

 


螢幕快照 2015-11-13 下午6.57.16.png
SAS Super FREQ
Posts: 388

Re: Can't recognize Chinese value

Hi, Erica! I see you are using SAS Studio. Are you using it in the context of SAS University Edition, SAS OnDemand for Academics, or something else? The product you are using may determine the answer to your question.

 

Randy

New Contributor
Posts: 2

Re: Can't recognize Chinese value

Posted in reply to RandyMullis

Hi Randy, 

Yes, it's SAS Univertidy edition!

 

Erica

Ask a Question
Discussion stats
  • 2 replies
  • 312 views
  • 0 likes
  • 2 in conversation