BookmarkSubscribeRSS Feed
samd123
Calcite | Level 5

Hello, We are using SAS 9.4 M7 on rhel 7, grid environment. 

 

When running below proc sql to pull data from Sybase db, var-1 and var-2 comes out with blank value. When look at variable details in EG table, both var-1 and var-2 has type: Character, length: 1.

 

code

proc sql outobs=100;
connect to odbc as myconn(datasrc='XYZ' user='user1' password='encryoted-pwd');
create table test1 as
select * from connection to myconn
(
select
var-1
, var-2
, var-3
, var-4
, var-5
from sybase-db-tbl
);

disconnect from myconn;
quit;

 

odbc details

[XYZ]
Description=Sybase ODBC Data Source
Driver=/path-to-lib/lib/libsybdrvodb.so
#Driver=/path-to-lib/lib/libsybdrvodb-sqllen4.so
DriverUnicodeType=1
Server=servername.com
Port=12345
Database=db_1
UseCursor=1
EnableProcessLicensing=1

 

sasenv_local

 

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path-to-syb/syb/DataAccess64/ODBC/lib
export LD_LIBRARY_PATH
DRIVER_LIBRARY_PATH=/path-to-syb/syb/DataAccess64/ODBC/lib
export DRIVER_LIBRARY_PATH
EASYSOFT_UNICODE=YES
export EASYSOFT_UNICODE

 

However, when data pull from different tool, var-1 and var-2 has values like below (example).

 

var-1

ABC

DEF

GHI

JKL

 

var-2

DDF

FGH

JKL

175

 

4 REPLIES 4
SASKiwi
PROC Star

What about the other columns? Do they populate OK? If so what type and length are they?

samd123
Calcite | Level 5

yes, other columns in EG populating fine. 

 

example

var-3 is type: numeric, length:8 

var-4 is type:date, length:8

 

Its a character data not coming out fine. 

samd123
Calcite | Level 5

Also, this is happening after we have upgraded Sybase DB client on server side to 'Sybase_16.0_SP04'. Assuming it has to do something with it. Possibly, we can plug-in some additional parameters in odbc.ini file for that specific connection to treat character type of data differently/correctly. 

 

Thank you. 

SASKiwi
PROC Star

So was it working OK before upgrading your Sybase DB client? I'd suggest you open a Tech Support track so they investigate more fully what has happened here.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 908 views
  • 0 likes
  • 2 in conversation