I connect mysql(utf8 encoding) with libname
libname rdm mysql server=..... dbconinit='set names gbk'
('set names utf8' fails but 'se names gbk' works when I appends data to MySQL)
I append data to MySQL tables(utf8)
There are errors about encoding when appending data.(There are other languages or '€' etc)
proc append base=rdm.wdj data=source.wdj force force;
run;
he appending procedure stops whenever there is an error.
How do I skip the error data and keep appending the next data?
Check your SAS Session encoding.
proc options option=encoding;run;
Also check your dataset encoding,
/*Check your data set encoding*/
%let dsn=jliang1.group_info;
%let dsid=%sysfunc(open(&dsn,i));
%put &dsn ENCODING is:
%sysfunc(attrc(&dsid,encoding));
/*Or*/
proc contents data=jliang1.group_info;run;
What SAS Application are you using, EG or Base SAS? If Base SAS then open SAS UTF-8 application and run the code.
FYI.....http://support.sas.com/kb/51/586.html
Check your SAS Session encoding.
proc options option=encoding;run;
Also check your dataset encoding,
/*Check your data set encoding*/
%let dsn=jliang1.group_info;
%let dsid=%sysfunc(open(&dsn,i));
%put &dsn ENCODING is:
%sysfunc(attrc(&dsid,encoding));
/*Or*/
proc contents data=jliang1.group_info;run;
What SAS Application are you using, EG or Base SAS? If Base SAS then open SAS UTF-8 application and run the code.
FYI.....http://support.sas.com/kb/51/586.html
Thanks.
I use EG to connect to MySQL(UTF8)
My dataset is euc-cn Simplified Chinese.
Can I change the dataset from euc-cn to UTF8?
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.