BookmarkSubscribeRSS Feed
deleted_user
Not applicable
Hi,

I am trying to run a sas prog on a remote server using ssh.


I have got the command that I am using in the below paragraph. With it, I was able to run shell scripts but when I tried 'sas' it errored out. I have got my keys exchanged so when I say ssh serverA I automatically connect to my remote server. (Note: All the commands in the quotations run one by one when they hit a semi-colon).



When I run the below I get an error ksh: sas: not found.


ssh serverA "cd /directory/sas; pwd;ls; sas avi.sas"



Any help would be appreciated. I was thinking to do this in the above fashion. If there are any other suggestions on how to run a sas job on a remote server, please enlighten me.



Thanks,

Cool_avi
4 REPLIES 4
lu
Calcite | Level 5 lu
Calcite | Level 5
Hi

Use ./sas avi.sas command.

lu
deleted_user
Not applicable
Hi Lu,

I tried that but get the same error. 😞 .


Thanks,

Cool_avi
lu
Calcite | Level 5 lu
Calcite | Level 5
Hi Cool_avi
to run sas in batch mode you need

'full path to sas ' 'fill path to you program'

root directory of sas - /sas
you program in /Cool_avi/avi.sas

to run program avi.sas
/sas/sas /Cool_avi/avi.sas
----------------------------------------------
or
cd /sas
./sas /Cool_avi/avi.sas
-----------------------------------------------------
or
cd /Cool_avi
/sas/sas avi.sas
----------------------------------------------


lu Message was edited by: lu
deleted_user
Not applicable
Thanks Lu :). That worked for me. I had to specify the whole qualified path to SAS before my script. I appreciate the help.




Regards,

Cool_avi

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!

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
  • 4 replies
  • 3608 views
  • 0 likes
  • 2 in conversation