The SAS Output Delivery System and reporting techniques

Ability to run sas prog on remote server using SSH

Reply
N/A
Posts: 0

Ability to run sas prog on remote server using SSH

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
Contributor lu
Contributor
Posts: 23

Re: Ability to run sas prog on remote server using SSH

Posted in reply to deleted_user
Hi

Use ./sas avi.sas command.

lu
N/A
Posts: 0

Re: Ability to run sas prog on remote server using SSH

Posted in reply to deleted_user
Hi Lu,

I tried that but get the same error. Smiley Sad .


Thanks,

Cool_avi
Contributor lu
Contributor
Posts: 23

Re: Ability to run sas prog on remote server using SSH

Posted in reply to deleted_user
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
N/A
Posts: 0

Re: Ability to run sas prog on remote server using SSH

Thanks Lu Smiley Happy. That worked for me. I had to specify the whole qualified path to SAS before my script. I appreciate the help.




Regards,

Cool_avi
Ask a Question
Discussion stats
  • 4 replies
  • 1581 views
  • 0 likes
  • 2 in conversation