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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 3775 views
  • 0 likes
  • 2 in conversation