How do I pull in datasets from the work library from another SAS session/project?
Thanks in advance,
Andy
Hi @Andy_D,
%put %sysfunc(pathname(work));
libname work2 'the_path_goes_here';
Hi @Andy_D,
%put %sysfunc(pathname(work));
libname work2 'the_path_goes_here';
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.
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.
@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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.