SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

SAS - SAP Integration Problem, Unicode

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 9
Accepted Solution

SAS - SAP Integration Problem, Unicode

[ Edited ]

Hello everyone!

 

I am experiencing the same problem as a person in this theme: (https://communities.sas.com/t5/Base-SAS-Programming/SAP-HANA/m-p/277026/highlight/true#M55574)

When I try to connect to SAP Hana database with ODBC connector using connection string in SAS DI, it throws an error:

 

ERROR: CLI cursor fetch error: [SAP AG][LIBODBCHDB DLL][HDBODBC] General error;-10427 Conversion of parameter/column (3) from data type NVARCHAR to ASCII failed

 

This error is definitely the Unicode one, because I can’t import some columns with Unicode symbols while others are well imported.

 

When I connect to SAP Hana with Metadata Server, it imports all needed tables, but throws an error which is attached.

Could somebody explain step by step approach to solve this problem?

 

Many thanks in advance.


Accepted Solutions
Solution
‎09-26-2017 11:38 AM
Occasional Contributor
Posts: 9

Re: SAS - SAP Integration Problem, Unicode

I solved this problem.

I have changed encoding in sasv9.cfg files in Workspace Server directory and SASApp server directory.

 

Thanks for help! 

View solution in original post


All Replies
PROC Star
Posts: 2,311

Re: SAS - SAP Integration Problem, Unicode

Moved question to Data Management board.

 

This is an ODBC error message. Are you sure this driver supports unicode data?

Occasional Contributor
Posts: 9

Re: SAS - SAP Integration Problem, Unicode

ChrisNZ, Yes I am quite sure that this driver supports Unicode transfer. 

(here is the topic on SAP forum https://archive.sap.com/discussions/thread/3882688).

The problem is that SAS can't convert Unicode symbols - looks more like that, to my mind. 

Super User
Posts: 3,856

Re: SAS - SAP Integration Problem, Unicode

What is your SAS encoding setting? Maybe it is not set up for Unicode. Run proc options and tell us what the ENCODING option is set to. 

Occasional Contributor
Posts: 9

Re: SAS - SAP Integration Problem, Unicode

SASKiwi, My Encoding session is WCYRILIC.

I tried to change "C:\Program Files\SASHome\SASFoundation\9.3\sasv9.cfg" file to utf-8, but after relaunching SAS DI it showed wcyrillic again.

Could you tell how to change it correctly?

PROC Star
Posts: 2,311

Re: SAS - SAP Integration Problem, Unicode

What is the encoding of the sas session (I am not even sure there is a choice in DI)?
Can you use SQL pass through to ensure variables are sent as SQL_WLONGCHAR?
Can you use a different odbc client to ensure odbc is out of the equation?
Occasional Contributor
Posts: 9

Re: SAS - SAP Integration Problem, Unicode

[ Edited ]

My Encoding session is WCYRILIC.

I am using pass through facility (with coding) to import columns from HANA, but how to define that variables are send in SQL_WLONGCHAR? 

 

I have only one ODBC driver that fit my needs for Hana connection.

No idea what else can I use instead. 

Super User
Posts: 3,856

Re: SAS - SAP Integration Problem, Unicode

I suspect you might find some answers to your problems in the NLS Guide:

 

http://support.sas.com/documentation/cdl/en/nlsref/69741/HTML/default/viewer.htm#nlsrefwhatsnew94.ht...

 

You may need to check the LOCALE option as well as ENCODING.

Occasional Contributor
Posts: 9

Re: SAS - SAP Integration Problem, Unicode

SASKiwi, I tried to change encoding to UTF-8 in "C:\Program Files\SASHome\SASFoundation\9.3\sasv9.cfg" file with no effect for SAS Data Integration Studio. With proc options option=encoding; run; it showed WCYRILLIC again.

This article http://support.sas.com/resources/papers/Multilingual_Computing_with_SAS_94.pdf advises to make changes in Java font configuration files for SAS DIS.

What kind of changes should I make there (in this "C:\Program Files\Java\jre6\lib\fontconfig.properties.src" file as I understand)? I tried to find wcyrillic font anywhere there, but found nothing.

PROC Star
Posts: 2,311

Re: SAS - SAP Integration Problem, Unicode

>My Encoding session is WCYRILIC.

You may have to switch to UTF encoding. Read the documentation that @SASKiwi pointed to.

 

>I am using pass through facility (with coding) to import columns from HANA, but how to define that variables are send in SQL_WLONGCHAR

I was hoping as function such as CE_CALC would help, but it won't return type SQL_WLONGCHAR. There may be other functions to change type, or some of the supported types may not break Unicode. I don't have SAP here so can't test.

 

>I have only one ODBC driver that fit my needs for Hana connection.No idea what else can I use instead. 

Can you use a different odbc client to ensure odbc is out of the equation?

Client, not driver.

 

 

Solution
‎09-26-2017 11:38 AM
Occasional Contributor
Posts: 9

Re: SAS - SAP Integration Problem, Unicode

I solved this problem.

I have changed encoding in sasv9.cfg files in Workspace Server directory and SASApp server directory.

 

Thanks for help! 

Super User
Posts: 3,856

Re: SAS - SAP Integration Problem, Unicode

Great to hear!

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 11 replies
  • 864 views
  • 0 likes
  • 3 in conversation