07-19-2017 01:04 AM
I have Chinese language data in source file (.xlsx) . I am able to import it in proper Chinese language in SAS table (through UTF8 sas server) .
But when I am trying to insert SAS table data into target table ( oracle table ) than all Chinese language data converted into ‘?’ marks .
When Target team trying to load some sample Chinese language data directly on oracle table using import option than it’ coming in proper Chinese language format .
In same table some column have data in number , date and English language data and those data inserted in proper format .
I am using insert statement for load data into Oracle table.
libname SAS_DEV oracle authdomain=’XXXXXXXXX’ path=”XXXXXXXXX’ schema='SAS_DEV';
Insert into SAS_DEV.FX_MARKET_UPDATE_EXTERNAL
ENG_DESC,SIM_CHIN_HEADER_DESC ,SIM_CHIN_HEADER_DESC, AMT_NUM, CREATE_DT
select ENG_DESC,SIM_CHIN_HEADER_DESC ,SIM_CHIN_HEADER_DESC, AMT_NUM, CREATE_DT
Is anyone help me in this issue?
Please see attached file
07-19-2017 01:28 AM
You may need to check the character-set encoding for your SAS environment.
Can you run the following lines and paste the output, especially for ENCODING and LOCALE:
proc options group=languagecontrol; run;
07-19-2017 09:48 AM
Make sure SAS and Oracle have the same encoding.
Change environment variable in sasenv_local .
07-19-2017 11:22 PM
I have used below line before insert SAS table data in Oracle but it’s not working result is same .
proc options group=language control;
when I am running code under UTF-8 SAS Session than SAS table showing data in Chinese language but when same SAS table I use to open in SAS Normal session than Chinese data not showing in proper order.
It’s means SAS internally storing data in “?” or “|_” symbol. Only showing in proper format in UTF-8 SAS Session. My SAS session support UTF-8 .
@Ksharp :- could you please explain me how to change environment variable in sasenv_local when I am running my SAS code. So data store in Multi byte under SAS table.
If you have any example code than please let me know.
07-20-2017 08:45 AM
Sorry. Based on my experience before. If your SAS is under AIX / UNIX , there is a file named sasenv_local you can use.
Change the encoding of SAS into the same as Oracel. I have forgotten how to edit it.
Search 'sasenv_local ' at support.sas.com .
File to modify: /app/sas/sashome/SASFoundation/9.4/bin/sasenv_local export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P1
07-21-2017 03:34 AM
I have already used (x 'export NLS_LANG=UTF-8' in my code before LIB statement .
x 'export NLS_LANG=UTF-8';
libname SAS_DEV oracle authdomain='*************'path='***********'schema='SAS_DEV';
length CHINESE Nvarchar(40) ;
set work.Test2 ;
but same '?' showing in Oracle table.