I'm considering linking a new custom task, written in VB.NET, to a specific SAS license, so I will need a quick way to get the site number of the active server, so I can check it whenever the custom task is opened.
If I use Consumer.ActiveServer, is there a quick way to get the site number of that active server?
...........Phil
Phil,
You can get it this way:
Dim sasServer as New SAS.Tasks.Toolkit.SasServer(Consumer.AssignedServer)
sitenum = sasServer.GetSasMacroValue("SYSSITE")
Chris
FYI I know that the information I need is in &syssite. I just don't know how to get this information quickly (and easily).
............Phil
Phil,
You can get it this way:
Dim sasServer as New SAS.Tasks.Toolkit.SasServer(Consumer.AssignedServer)
sitenum = sasServer.GetSasMacroValue("SYSSITE")
Chris
That was a lot easier than I had expected.
Many thanks...........Phil
Hi Chris, could you do me a favor?
I just install Base SAS9.3 and SAS Enterprise Guide 5.1; While whenever I run SAS EG, it says no profile selected. While when I try to add an profile and set it active. It always pops up "an unexpected error...". How should I set up the server for EG and use it normally?
If you have SAS 9.3 installed on the same Windows machine as EG, you don't need to do anything additional. You should already have a server named "Local" that uses your local SAS instance automatically.
"No profile" means no metadata profile is configured. You need a metadata profile only if you are going to connect to a remote SAS session.
Chris
Hi Chris, thx for your reply. How's going today.
The reason why I am trying to find and connect to a remote free open server is because, although SAS9.3 is installed while I cannot run command on sas enterprise guide. ERROR MESG is like : a connection to server 'local' could not be established.
I checked a lot of troubleshooting method mentioned on SAS web, while problem is still there. Do you have any idea of that?
Check Help->About SAS Enterprise Guide, and click Configuration Details
You'll see a window like this:
If it doesn't show a "SAS System version" or "SAS System command", then you don't have a properly installed version of SAS.
If you know for certain that you have SAS installed, try running this command from a command prompt:
"c:\program files\sashome\sasfoundation\9.3\sas.exe" -regserver
(Changing the path to where your SAS.EXE is installed.)
You won't see any message from the command, but after running it try restarting SAS Enterprise Guide and see if you can see a "Local" SAS server.
Chris
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.