BookmarkSubscribeRSS Feed
sudharsanan
Calcite | Level 5

I need to find whether the user has signed on to any server from PC SAS. I could do it with the server name which is signed on, by getting it from a macro variable. But I would need to do it without using the server name macro variable.

So, is it possible to just know whether any server is remotely signed on from PC SAS by using set of SAS Base or SCL code?

Thanks!

-Sudharsanan

5 REPLIES 5
Kurt_Bremser
Super User

If you mean active SAS/CONNECT or workspace server sessions, you best call a shell script and read the output.

eg

filename oscmd pipe "ps -ef|grep grlink";

data connectusers;

infile oscmd;

length user $ 8;

input user;

run;

grlink is typical for SAS/connect commandlines, you can use any other option that is indicative of the processtype you wish to list ('bridge spawned' for workspace servers)

This method is for UNIX servers, and you may have to tinker with the ps options depending on which UNIX you are on. ps -ef is for AIX. Don't know how to get it via commandline on windows.

sudharsanan
Calcite | Level 5

@KurtBremser Thanks for your reply. I think "ps -ef|grep grlink" is a unix command. I think the code provided are for Unix server, may be used by remote submitting to a Unix server for PC SAS.

To be clear on my question, from my Windows SAS Base, I need to find whether any server (mostly Unix server) is signed on already or not. I need to do the verification before remote submitting any statements to the signed on server.


Kurt_Bremser
Super User

So what you want to know is if, in your current SAS session on windows, you have already established a SAS/CONNECT connection to one of the defined servers which reside on any platform?

jakarman
Barite | Level 11

and the listtask information? (also documented with SAS/connect) as is waitfor.

---->-- ja karman --<-----

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 5 replies
  • 1157 views
  • 1 like
  • 4 in conversation