Desktop productivity for business analysts and programmers

Accessing server libraries

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 15
Accepted Solution

Accessing server libraries

Hi-

 

New to SAS Enterprise Guide and trying to understand how to use EG in the Programming window to access my dataset stored on our SAS server.  Data is located under Servers/SASApp/Libraries/Medic1 and the dataset name is: RiverdaleMed

 

Wrote this:  data a; Set Medic1.RiverdaleMed; where location in ('15');run;  

 

I am getting error message in my log telling me  ERROR: Libref Medic1 is not assigned.   

 

Can anyone help me get started?  Thanks in advance!!

 


Accepted Solutions
Solution
‎02-07-2018 04:44 PM
Super User
Posts: 4,024

Re: Accessing server libraries

There's an EG Task to upload local datasets to the SAS server: Tasks / Data / Upload Data Files to Server.

 

You can't reference your local PC drive from the SAS server in code without a lot of IT admin, and it wouldn't be very efficient anyway as you say.

 

You may also want to consider asking your IT Admin to set up a permanent SAS server LIBREF for you, particularly if it is being shared with other users. That means it is automatically set up in EG when you connect to the SAS server and you don't need to code for it yourself.

View solution in original post


All Replies
Super User
Posts: 4,024

Re: Accessing server libraries

Before you can read your dataset you need to assign the LIBREF medic1 pointing at your SAS library:

libname medic1 '//Servers/SASApp/Libraries/Medic1';

 

 

Occasional Contributor
Posts: 15

Re: Accessing server libraries

Hi- Thanks for responding. I am now getting a green NOTE message telling me Library medic1 does not exist? Any insights?
Super User
Posts: 4,024

Re: Accessing server libraries

Please post the SAS log containing the LIBNAME statement and any notes. Did it assign successfully?

Occasional Contributor
Posts: 15

Re: Accessing server libraries

25 libname medic1 '//Servers/SASApp/Libraries/medic1';
NOTE: Library medic1 does not exist.

26
27 GOPTIONS NOACCESSIBLE;
28 %LET _CLIENTTASKLABEL=;
29 %LET _CLIENTPROCESSFLOWNAME=;
30 %LET _CLIENTPROJECTPATH=;
31 %LET _CLIENTPROJECTNAME=;
32 %LET _SASPROGRAMFILE=;
33
34 ;*';*";*/;quit;run;
35 ODS _ALL_ CLOSE;
36
37
38 QUIT; RUN;
39

Super User
Posts: 4,024

Re: Accessing server libraries

It looks like the path //Servers/SASApp/Libraries/medic1 is incorrect. Please talk to your SAS admin to find out what the correct path is. Usually the first bit is the server name like this //ServerName which may go on the front of the path you have. Also try this: /Servers/SASApp/Libraries/medic1.

Occasional Contributor
Posts: 15

Re: Accessing server libraries

Ok. Thanks. 

 

One more question:

 

What about datasets in my local drive?  Must all the datasets reside on the Server to use EG within SAS Server?   OR can I use a reference library in my local drive:  D:\1OrigDataSets\March\Oceanside and run my code in the Program Window within the Server.  

 

Definitely, the server will be able to process all the merge/sorts/appends much quicker than if it was in my local drive.  Any info?  

 

Thank you so much for responding!

 

Solution
‎02-07-2018 04:44 PM
Super User
Posts: 4,024

Re: Accessing server libraries

There's an EG Task to upload local datasets to the SAS server: Tasks / Data / Upload Data Files to Server.

 

You can't reference your local PC drive from the SAS server in code without a lot of IT admin, and it wouldn't be very efficient anyway as you say.

 

You may also want to consider asking your IT Admin to set up a permanent SAS server LIBREF for you, particularly if it is being shared with other users. That means it is automatically set up in EG when you connect to the SAS server and you don't need to code for it yourself.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 219 views
  • 0 likes
  • 2 in conversation