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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

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
  • 4 replies
  • 671 views
  • 0 likes
  • 2 in conversation