BookmarkSubscribeRSS Feed
sid3284
Calcite | Level 5

Hi,

 

We are connecting to SAP SQL anywhere database from SAS to read data.

 

We can create the connection through libname statement. 

 

LIBNAME test ODBC READBUFF=1000 USER=xxxxxxx PASSWORD=xxxxxxxxx DATAsrc=Ticketmaster SCHEMA=dba ;

 

We can see tables in the library. However when I try to open the table it opens as a blank table. 

But I know there is data in that table.

 

What am I missing?

 

Regards,

Sid.

9 REPLIES 9
Reeza
Super User

What happens if you try to read from a data set? Do you get an error?

 

data want;
set test.DATASETNAME (obs=100);

run;

@sid3284 wrote:

Hi,

 

We are connecting to SAP SQL anywhere database from SAS to read data.

 

We can create the connection through libname statement. 

 

LIBNAME test ODBC READBUFF=1000 USER=xxxxxxx PASSWORD=xxxxxxxxx DATAsrc=Ticketmaster SCHEMA=dba ;

 

We can see tables in the library. However when I try to open the table it opens as a blank table. 

But I know there is data in that table.

 

What am I missing?

 

Regards,

Sid.


 

sid3284
Calcite | Level 5

I dont get an error. But I dont see any data.

 

25 GOPTIONS ACCESSIBLE;
26 data want;
27 set test.tc_api_sas_manifest_Seat_export (obs=100);
28
29 run;

NOTE: There were 0 observations read from the data set TEST.tc_api_sas_manifest_Seat_export.
NOTE: The data set WORK.WANT has 0 observations and 74 variables.
NOTE: DATA statement used (Total process time):
real time 0.28 seconds
cpu time 0.08 seconds

VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

Did you setup a ODBC connection that defines your source?

sid3284
Calcite | Level 5

yes. Below is the odbc.ini entry.

 

 

 

[Ticketmaster]
Driver=/sas/sqlanywhere17/install/lib64/libdbodbc17.so
Description=SQL Anywhere 17
Host=xxxxxx
Userid=xxxxxx
DatabaseName=magic
Password=xxxxxxx

 

And below is the odbcinst.ini entry.

 

[SQLAnywhere17]
Driver = /sas/sqlanywhere17/install/lib64/libdbodbc17.so
Setup = /sas/sqlanywhere17/install/lib64/libdbodbc17.so

 

And below is the LD_LIBRARY_PATH entry.

 

export LD_LIBRARY_PATH=/usr/lib64/:/sas/sashome/SASODBCDriversfortheWebInfrastructurePlatformDataServer/9.4/Driver/:$ODBCHOME/lib64/:/sas/sqlanywhere17/install/lib64:/sas/sashome/SASFoundation/9.4/sasexe/:/sas/sashome/SASPrivateJavaRuntimeEnvironment/9.4/jre/lib/amd64/server/:/sas/sqlanywhere17/install/lib64/

SASKiwi
PROC Star

I suggest you track this to SAS Tech Support if you haven't already done so. They are in the best position to diagnose what is going on here.

Tom
Super User Tom
Super User

I don't know anything about ANYWHERE, but in other database systems that is usually a symptom of not having the right permissions to read the data.

SimonDawson
SAS Employee

If I was in your shoes I'd have a look at the API trace that can be generated with sastrace. You might try use the same ODBC driver in another application (e.g. isql from unixODBC).

sid3284
Calcite | Level 5

Thanks all. Turns out that we were connecting to another database server. We connected to the correct database and we can see the data. 

SASKiwi
PROC Star

@sid3284 - In that case please update your post as answered.

suga badge.PNGThe SAS Users Group for Administrators (SUGA) is open to all SAS administrators and architects who install, update, manage or maintain a SAS deployment. 

Join SUGA 

Get Started with SAS Information Catalog in SAS Viya

SAS technical trainer Erin Winters shows you how to explore assets, create new data discovery agents, schedule data discovery agents, and much more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 9 replies
  • 1419 views
  • 2 likes
  • 6 in conversation