BookmarkSubscribeRSS Feed
12345
Calcite | Level 5
Hi

I use this code but I don't understand what it really does. It was written by someone in windows enviroment and now we changed to solaris(UNIX). I am not very clear with solaris(UNIX) syntax. Can someone explain to me what it says:

proc sql;
connect to sqlsvr as BDMIS (datasrc="BDMIS" user=sasuser password=XXXXXXX);
create table temp4.FACT_BASE as
select * from BDMIS
(SELECT * FROM FACT_BASE
WHERE &wherefmt);
quit;

ERROR: Invalid option name SELECT.
ERROR: Some options for file WORK.BDMIS were not processed because of errors or warnings noted above.
1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
I think that your error is that you are missing a "connection to" clause in the first select statement. Without it, SAS thinks that BDMIS is a SAS dataset in the WORK library. I would have expected this to have failed the same way on Windows.

proc sql;
connect to sqlsvr as BDMIS (datasrc="BDMIS" user=sasuser password=XXXXXXX);
create table temp4.FACT_BASE as
select * from connection to BDMIS
(SELECT * FROM FACT_BASE
WHERE &wherefmt);
quit;

The database specific syntax is described in the SAS Access documentation. This code uses the "pass thru" syntax for SQL.

Did you get an error on the "connect to" statement? If so, you may have a bigger problem. Microsoft SQLserver is only supported via the ODBC connectivity in SAS 8.2 and above. So a simple copy of the program to Solaris will not get you running. You will also need the SAS/Access to ODBC product for Solaris and the appropriate system connections to get to the SQLserver database. [If you are connecting to the Sybase product, you may be OK.]

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 1 reply
  • 1076 views
  • 0 likes
  • 2 in conversation