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: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 5 replies
  • 1275 views
  • 1 like
  • 4 in conversation