SAS DATA ENCODING 解决odbc乱码问题

时间:2021-08-11 15:10:40

首先获取编码格式:

%PUT %SYSFUNC(getOption(ENCODING));

libname findoout ODBC

datasrc=SurveyReport

user=shendu

password=********

preserve_tab_names=yes

connection=shared

insertbuff=1000

readbuff=2500;

LIBNAME S 'C:\Users\Administrator\Desktop\PAYRECORD\data';

**"EUC-CN"为当前编码格式;
DATA S.PayRecordInfo(encoding="EUC-CN");
    SET findoout.PayRecordInfo;
RUN;

PROC PRINT DATA=S.PayRecordInfo(OBS=10);
RUN;