DATA Step, Macro, Functions and more

Get Operating System into a variable

Accepted Solution Solved
Reply
New Contributor
Posts: 2
Accepted Solution

Get Operating System into a variable

Hi

 

I need to get the 'Operating System' or the machine where my SAS server is running.

I can get this information from the PROC SETINIT; RUN; command (e.g. Operating System: LIN X64). My questions:

  1. How can I save this information into a variable?
  2. Are there other ways to get the same information (e.g. a specific function)?
  3. More in general, is there a way to get the output of the PROC SETINIT; RUN; command (or the log generated by any other command) into a data set and then analyze it, for example, with a regular expression?

Thanks in advance for your support.

Bye. Lorenzo


Accepted Solutions
Solution
‎06-10-2016 01:45 AM
Super User
Posts: 6,946

Re: Get Operating System into a variable

Look at the SYSSCP and SYSSCPL automatic macro variables.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers

View solution in original post


All Replies
Super User
Posts: 17,864

Re: Get Operating System into a variable

http://support.sas.com/documentation/cdl/en/mcrolref/61885/HTML/default/viewer.htm#z3514sysscp.htm

 

Most are automatic macro variables. See the documentation. 

Super User
Posts: 3,111

Re: Get Operating System into a variable

Run: %put _AUTOMATIC_; to see all the macro variables that you could consider using. 

Solution
‎06-10-2016 01:45 AM
Super User
Posts: 6,946

Re: Get Operating System into a variable

Look at the SYSSCP and SYSSCPL automatic macro variables.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
New Contributor
Posts: 2

Re: Get Operating System into a variable

Hi to all who replied my question

 

Thank you very much for your very quick support.

The provided information solved my problem.

 

Have a nice day. Lorenzo

☑ This topic is SOLVED.

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

Discussion stats
  • 4 replies
  • 283 views
  • 0 likes
  • 4 in conversation