BookmarkSubscribeRSS Feed
RaphaelGnecco
Calcite | Level 5

Hello,

 

Is possible to return the machine domain from the user?

 

i can return the hostname using "_CLIENTMACHINE" from SASHELP.VMACRO, but i cant find the Windows domain.

 

Anyone knows where i can find this?

 

Thank you

 

Raphael Gnecco

4 REPLIES 4
jennifert
SAS Employee

Hi @RaphaelGnecco ,

You can view all of the SAS macro variables in your current SAS session by selecting Tools > SAS macro variable viewer from the SAS Enterprise Guide menu.

Does that help?

 

thanks,

Jennifer


Catch the SAS Global Forum keynotes, announcements, and tech content!
sasglobalforum.com | #SASGF

RaphaelGnecco
Calcite | Level 5

Hi @jennifert , in the SAS macro variable viewer, only have the _CLIENTNAME, but i can´t find the Machine Domain. I try to search in the SASLIBs, but i cannot find that information.

SASKiwi
PROC Star

The system macro variable _SASHOSTNAME reports your SAS application server's name including the domain. I don't think there is any similar one for your client PC except _CLIENTNAME which as you say doesn't include the domain.

Tom
Super User Tom
Super User

Why not ask Windows for that information?

On my Windows machine I see environment variables like 

USERDNSDOMAIN=xxx.yyy.COM
USERDOMAIN=xxx
USERDOMAIN_ROAMINGPROFILE=xxx
USERNAME=zzz
USERPROFILE=C:\Users\zzz

not sure if those are Windows defaults or something our local support team created.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

Creating Custom Steps in SAS Studio

Check out this tutorial series to learn how to build your own steps in SAS Studio.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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