04-12-2014 10:51 AM
Attached is a program with log that I am trying to run again one of
the servers. It runs fine on PC SAS. But when I tried to run it on EG SAS, I am
a getting this error (see at the bottom): I don’t’ understand what this error
is all about.. Here what does "near 2 means"?
ERROR: CLI describe error: [Sybase][ODBC
Driver][Adaptive Server Enterprise]Incorrect syntax near '2'.
I would appreciate your help..
04-12-2014 01:56 PM
My first question is, is the SAS session that EG connects to on your local PC, or are you using a SAS process on a remote server to run this code? The debugging process will be different depending on the answer.
04-16-2014 02:18 PM
I think that is onto something. I would suggest that you test his hypothesis with some very simple code that would pull some data out of one of your tables using the pass-through syntax that you are trying to use.
Without knowing anything about your database, I would use something like this to prevent putting any load on your environment:
%LET facid=("DSN=Reporting;" || "UID=rp&UID.;" || "PWD=&pwd.;" || "SERVER=cbcfrpt00");
connect to odbc &facid;
create table work.TestOutput as select UMUM_REF_ID from CMC_UMUM_UTIL_MGT(obs=10);
If you get data back, it means that your macro variable is working correctly. If not, you'd need to tinker with your macro variable and connect statement until you get data back. Then you can proceed with your more complex statement.
04-14-2014 08:31 AM
We do have ODBC connections set up on the server. If I run a very simple query against that db, it works..also the steps before this SQL works where I am pointing to the same db. But it’s just I am getting this error message when I try to run this SQL. And I don't understand the error either.. Also this SQL runs fine on PC SAS. Doesn't look like anything wrong iwth the query. May there is something in thei query that EG doesn't like..?
04-14-2014 08:42 AM
Looking at your log it appears to me that the connection string is incorrect.
411 connect to odbc &facid; /* Chris DSN for FACETS is logidf */
SYMBOLGEN: Macro variable FACID resolves to ("DSN=Reporting;" || "UID=xxxx;" || "PWD=xxxx;" || "SERVER=xxxx")
This means SAS sees the following:
connect to odbc ("DSN=Reporting;" || "UID=xxxx;" || "PWD=xxxx;" || "SERVER=xxxx");
I believe it should be:
connect to odbc (DSN=Reporting UID=xxxx PWD=xxxx SERVER=xxxx);
04-14-2014 09:09 AM
AnnaShami, that is a lot of information to think...
Eguide is nothing more as a very good editor, it does not run the SAS code.
You can direct that code either to "local" or to a server "SASApp". When you send your code to 'local" that is your pc/desktop PC SAS, there is no difference at all.
Very sure this code runs unchanged when using "local' correct?
Your included log is telling the code has run in a Windows environment (namings //../../), as you say the ODBC connection is working (DNS=).
To pinpoint to a cause eliminiate all those possible differences.
- which SAS version local and on the server
- which ODBC version local and on the server.
- What SAS options have been set. Special attention for those for the ODBC Access
You are using explicit pass through, still you could activate a trace to see what is happening / getting better information