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?
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.