how to find whether any server is signed on from SAS/Base?

Reply
Occasional Contributor
Posts: 15

how to find whether any server is signed on from SAS/Base?

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

Super User
Posts: 7,762

Re: how to find whether any server is signed on from SAS/Base?

Posted in reply to sudharsanan

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.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Occasional Contributor
Posts: 15

Re: how to find whether any server is signed on from SAS/Base?

Posted in reply to KurtBremser

@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.


Super User
Posts: 7,762

Re: how to find whether any server is signed on from SAS/Base?

Posted in reply to sudharsanan

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?

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Posts: 5,424

Re: how to find whether any server is signed on from SAS/Base?

Posted in reply to sudharsanan
Trusted Advisor
Posts: 3,212

Re: how to find whether any server is signed on from SAS/Base?

Posted in reply to sudharsanan

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

---->-- ja karman --<-----
Ask a Question
Discussion stats
  • 5 replies
  • 249 views
  • 1 like
  • 4 in conversation