BookmarkSubscribeRSS Feed
Loka625
Calcite | Level 5

Hi,

 

I'm trying to run a shell script to kill a process in linux server, but when i run the process from SAS studio it is running the script in a different server, how to run that shell script in a server that i want to.

 

please do the needful

 

Thanks

kola625

3 REPLIES 3
Tom
Super User Tom
Super User

SAS/Studio itself cannot run any operating system commands.  It is the front end that you interact with to submit SAS code.  Now the SAS code you submit using SAS/Studio can run operating system commands (as long as that has not been prevented by the administrator).  Those command will obviously run on the machine where SAS itself is running.  That might machine most likely is not the machine where you are running the browser you are using to interact with SAS/Studio.  

 

If you want to run a command on another server you could try using the ssh command.

 

So if you are trying use X, SYSTEM or PIPE to run a command link:

kill 1234

Then to run that command on a server named fred.mycompany.com you would instead run the command

ssh fred.mycompany.com kill 1234
Loka625
Calcite | Level 5

Thank you Tom for the response,

 

the shell script to kill and start the server is working completely fine, I'm having issues with, when I'm trying to run the script from SAS Studio using Batch Job, it is running it on a different server, instead i want it to run on a server that i want to, is there any command that i can include in SAS batch job to host the program in a server that I need.

 

Thanks 

Kola

Kurt_Bremser
Super User

Please post your shell script code.

 

@Tom has already shown how to run a command on a different server via SSH. If you want to use your script on other servers, copy the script code there before using the SSH method.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!

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
  • 3 replies
  • 1010 views
  • 1 like
  • 3 in conversation