- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
How do I pull in datasets from the work library from another SAS session/project?
Thanks in advance,
Andy
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Andy_D,
- Determine the path of the work library in question, e.g., by submitting this in the other session:
%put %sysfunc(pathname(work));
- Use the path in a LIBNAME statement as usual (in the main session):
libname work2 'the_path_goes_here';
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Andy_D,
- Determine the path of the work library in question, e.g., by submitting this in the other session:
%put %sysfunc(pathname(work));
- Use the path in a LIBNAME statement as usual (in the main session):
libname work2 'the_path_goes_here';
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Since presumably this is someone else's work library and it might not be friendly to delete or overwrite data sets there, or if the intent is only to read data from that library it might be a good idea to use the Libname option Access=Readonly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This is a good point which I forgot to mention. I was not even sure that my suggestion would work for the OP because of possibly insufficient (read) permissions. Most often, I use this technique when working with two or more SAS sessions in parallel.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@FreelanceReinh wrote:
This is a good point which I forgot to mention. I was not even sure that my suggestion would work for the OP because of possibly insufficient (read) permissions. Most often, I use this technique when working with two or more SAS sessions in parallel.
I have the luxury (?) of not working in a server environment so I also was not sure that permissions would allow the connection, or at least not without an Admin's help. But I do work with shared network location libraries and try to not accidentally corrupt my supervisors data.