BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
jshoe
Fluorite | Level 6

Dear Hive,

 

We are running SAS 9.4 (TS1M5) on a Linux server [Linux LIN X64 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 CentOS Linux release 7.5.1804 (Core)].

 

Some of our data are stored in MS\SQL Server. To access those data we use the ODBC engine as follows:

 

libname datamart odbc dsn = PROD user = scott pw = tiger schema = datamart access = readonly;

 

This works as expected when we execute this statement as a batch job or through the SAS\EG application.

 

This statement does not work in SAS Studio. The SAS log reports that the libname assignment was successful; however, an extra character is being inserted between every character of the native table name. 

odbc.png

The ODBC driver is [libmsodbcsql-17.2.so.0.1].

 

Any explanation for this odd behavior inside SAS Studio. Better yet, how do we resolve this problem?

 

Thanks - Jack

 

1 ACCEPTED SOLUTION

Accepted Solutions
jshoe
Fluorite | Level 6

SOLVED: By default SAS Studio was starting the SAS workspace using the 'sas_u8' start-up script. This had the unwelcome side effect of putting DBCS into play which was then causing havoc over the ODBC channel. The specific fix was to add this assignment statement to ${SASHOME}/studioconfig/workspaceserver/workspaceserver_usermods.sh

SAS_COMMAND=/opt/sas/SASFoundation/9.4/bin/sas_en

 This then overrides the default setting of 'sas_u8' which was the root cause of our agita.

View solution in original post

3 REPLIES 3
Tom
Super User Tom
Super User

Looks like an ENCODING issue.  Perhaps the database is sending multiple byte characters (like UTF8 or UTF16) strings and SAS/Studio is interpreting them as single byte characters?

jshoe
Fluorite | Level 6

@Tom This was my initial thought, but the other way around. The settings for DCBS, DCBSLANG, and DCBSNAME are different on SAS Studio than in the other two SAS environments. I became frustrated trying to change the options in the SAS Studio configuration, so I took a pause to reach out to the hive for confirmation that I was at least on the correct solution path. Your kind response tells me that I am, so I'll cowboy up and at least make SAS Studio match the other two environments in this regard. If that solves the problem, I'll post here and let the community know.

jshoe
Fluorite | Level 6

SOLVED: By default SAS Studio was starting the SAS workspace using the 'sas_u8' start-up script. This had the unwelcome side effect of putting DBCS into play which was then causing havoc over the ODBC channel. The specific fix was to add this assignment statement to ${SASHOME}/studioconfig/workspaceserver/workspaceserver_usermods.sh

SAS_COMMAND=/opt/sas/SASFoundation/9.4/bin/sas_en

 This then overrides the default setting of 'sas_u8' which was the root cause of our agita.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1164 views
  • 1 like
  • 2 in conversation