BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
prholland
Fluorite | Level 6

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

1 ACCEPTED SOLUTION

Accepted Solutions
ChrisHemedinger
Community Manager

Phil,

You can get it this way:

Dim sasServer as New SAS.Tasks.Toolkit.SasServer(Consumer.AssignedServer)

sitenum = sasServer.GetSasMacroValue("SYSSITE")

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

View solution in original post

7 REPLIES 7
prholland
Fluorite | Level 6

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

ChrisHemedinger
Community Manager

Phil,

You can get it this way:

Dim sasServer as New SAS.Tasks.Toolkit.SasServer(Consumer.AssignedServer)

sitenum = sasServer.GetSasMacroValue("SYSSITE")

Chris

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
prholland
Fluorite | Level 6

That was a lot easier than I had expected.

Many thanks...........Phil

EDWARD1019
Calcite | Level 5

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?

ChrisHemedinger
Community Manager

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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.
EDWARD1019
Calcite | Level 5

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?

ChrisHemedinger
Community Manager

Check Help->About SAS Enterprise Guide, and click Configuration Details

You'll see a window like this:

local.png

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

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

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.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 1495 views
  • 1 like
  • 3 in conversation