Desktop productivity for business analysts and programmers

Running code on EG server, also need to save SAS data sets to local/network drives

Accepted Solution Solved
Reply
Contributor
Posts: 21
Accepted Solution

Running code on EG server, also need to save SAS data sets to local/network drives

So my team has been using desktop/pc SAS for about 15 years now, we are being dragged into the Enterprise Guide platform kicking and screaming :-)

 

Our EG server is running Unix, our local machines are running Windows 7. Endpoint will be local machines with only SAS PC File Server, EG and the add-in for MS Office installed, in less than 60 days...

 

We need to be able to save SAS data sets to a folder on a local or network drive. I do have Proc Export working using PC File Server and I can get Excel output as we need but I cannot figure out how to set a SAS Libname to a local/network folder.  

 

Thanks


Accepted Solutions
Solution
‎01-10-2018 02:09 PM
Community Manager
Posts: 3,454

Re: Running code on EG server, also need to save SAS data sets to local/network drives

Posted in reply to JSWilson64

The "Download Data Files" task does not support macro values, but the Copy Files task (in Data menu, v7.13 and later) does.  You'll have to deal with path names instead of libname.member notation.

View solution in original post


All Replies
Super User
Posts: 10,553

Re: Running code on EG server, also need to save SAS data sets to local/network drives

Posted in reply to JSWilson64

You can only define a libname for a directory that is visible on the SAS server, so you will need a common share on your environments.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
How to convert datasets to data steps
How to post code
SAS Employee
Posts: 199

Re: Running code on EG server, also need to save SAS data sets to local/network drives

[ Edited ]
Posted in reply to JSWilson64

Hi @JSWilson64

 

As you may know, the LIBNAME statement will be executed on the server where SAS Wirkspace server sessions are started.

So the path you use has to be relevant to that server.

For instance if you have a Windows server (I know yours is Unix but it is for the demonstration Smiley Happy) and you use 'libname test "c:\temp";', the path C:\temp will be the one on the server, not your local machine.

 

Samba drive or similar might be the way to go.

 

An alternative, native to SAS Enterprise Guide would be to use the Download Data Files to PC task, from Tasks => Data.

 

Hope that helps.


Cheers,
Damo

Contributor
Posts: 21

Re: Running code on EG server, also need to save SAS data sets to local/network drives

Thanks Damo! 

 

I'll look at that task - do you know if it can be set up to use macro variables for file and folder names?  That might just do the trick.

Solution
‎01-10-2018 02:09 PM
Community Manager
Posts: 3,454

Re: Running code on EG server, also need to save SAS data sets to local/network drives

Posted in reply to JSWilson64

The "Download Data Files" task does not support macro values, but the Copy Files task (in Data menu, v7.13 and later) does.  You'll have to deal with path names instead of libname.member notation.

Contributor
Posts: 21

Re: Running code on EG server, also need to save SAS data sets to local/network drives

Posted in reply to ChrisHemedinger

That helps!  Now I need to get our IT folks to upgrade us from 7.100.

Thanks, Chris, your SAS Dummy blog is helping a lot with this transition.

Community Manager
Posts: 3,454

Re: Running code on EG server, also need to save SAS data sets to local/network drives

Posted in reply to JSWilson64

Glad to hear it!

 

You can use the Copy Files task in earlier versions as a custom task (links all in the blog) -- but upgrade is better Smiley Wink

☑ This topic is solved.

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

Discussion stats
  • 6 replies
  • 318 views
  • 1 like
  • 4 in conversation