SAS: Determine programmatically which machine is running SAS
I am trying to write a macro, but it is accessing a path variable
- on Windows it could be C: \ Temp
- On Unix this might be / tmp
How can I determine programmatically which type of machine is running SAS so I can assign the appropriate path value?
Thank!
%put _automatic_;
is the first place you should look when looking for things like this - it shows all of the auto-defined macro variables, many of which define your work environment.
In this case, it &SYSSCPL.
provides the operating system (in my case X64_7PRO
for Windows 7 64 bit). There is also &SYSHOSTNAME
, which is the "name" of the computer (defined differently for different operating systems).