DATA Step, Macro, Functions and more

Read a sas dataset from a shared drive location

Accepted Solution Solved
Reply
Contributor
Posts: 41
Accepted Solution

Read a sas dataset from a shared drive location

[ Edited ]

I have a SAS data set (.sas7bdat) in a shared drive location. How do I read that file? If I use general libname command then I get the error so I'm assuming libname should be used to create librefs for sas grid specific locations only.

 

libname trial "S:\shared drive path";
data check1;
set trial.[dataset name that I want to read];
run;

 

NOTE: Library TRIAL does not exist.

ERROR: File TRIAL.[dataset name that I want to read].DATA does not exist.


Accepted Solutions
Solution
Thursday
Super User
Posts: 10,211

Re: Read a sas dataset from a shared drive location

Posted in reply to astha8882000

It means that the location is not available on your SAS server. It might be mounted there under another name (especially if your grid uses UNIX), or not mounted at all.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code

View solution in original post


All Replies
Solution
Thursday
Super User
Posts: 10,211

Re: Read a sas dataset from a shared drive location

Posted in reply to astha8882000

It means that the location is not available on your SAS server. It might be mounted there under another name (especially if your grid uses UNIX), or not mounted at all.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
Super User
Posts: 13,502

Re: Read a sas dataset from a shared drive location

Posted in reply to astha8882000

I would expect to see something in log indicating whether the library was successfully assigned.

From my log for example:

NOTE: Libref BRFSS was successfully assigned as follows:
      Engine:        V9
      Physical Name: <Path>\BRFSS

or a not that it wasn't successful. If not likely the issue would be either the path or permissions.

 

☑ This topic is solved.

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

Discussion stats
  • 2 replies
  • 48 views
  • 0 likes
  • 3 in conversation