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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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