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.
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
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.
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?
@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.
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.
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!
Get started using SAS Studio to write, run and debug your SAS programs.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.