DATA Step, Macro, Functions and more

How to access path of desktop in user's computer through macro variable

Accepted Solution Solved
Reply
Regular Learner
Posts: 1
Accepted Solution

How to access path of desktop in user's computer through macro variable

There is a piece of code needed to be submiteed by many other users, the paths of desktop vary in different computers, and I want to output the result of submission to desktop of each user, how to access desktop in coding? Ask each user to change the output destination path is boring as there are many users and lots of them don't know how to change it.

Accepted Solutions
Solution
‎06-06-2016 08:17 PM
Super User
Posts: 19,805

Re: How to access path of desktop in user's computer through macro variable

I'd be pretty peeved at a tool that dumped files on my desktop. 

 

You dont have a common location such as C:\_localdata\exports

 

Or perhaps add a %window that asks a user to specify the output path. 

View solution in original post


All Replies
Super User
Posts: 5,429

Re: How to access path of desktop in user's computer through macro variable

Desktop computing seem a bit old fashioned, but ok.
Why kind of code and output are we talking about?
What SAS license does your SAS clients have? Any server SAS in the environment?
Having SAS and programs in shared location might help?
Data never sleeps
Super User
Posts: 7,782

Re: How to access path of desktop in user's computer through macro variable

Use HTML/HTTP as medium

 

- have the code create a $HOME/public_html directory, if it does not exist already

- write the output there with ods html (example filename $HOME/public_html/output.html)

- let the users open http://servername/~username/output.html in a browser

 

This of course assumes that

- your server runs UNIX

- has a HTTP server running

- the default configuration of the HTTP server regarding user directories has not been changed

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Solution
‎06-06-2016 08:17 PM
Super User
Posts: 19,805

Re: How to access path of desktop in user's computer through macro variable

I'd be pretty peeved at a tool that dumped files on my desktop. 

 

You dont have a common location such as C:\_localdata\exports

 

Or perhaps add a %window that asks a user to specify the output path. 

Super User
Posts: 7,782

Re: How to access path of desktop in user's computer through macro variable


Reeza wrote:

I'd be pretty peeved at a tool that dumped files on my desktop. 

 



<grin>

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
☑ This topic is solved.

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

Discussion stats
  • 4 replies
  • 503 views
  • 5 likes
  • 4 in conversation