title: Executing a SAS program in R using system() Command
body: <p>My company recently converted to SAS and did not buy the SAS SHARE license so I cannot ODBC into the server. I am not a SAS user, but I am writing a program that needs to query data from the server and I want to have my R script call a .sas program to retrieve  the data. I think this is possible using </p>
  
  <p><code>df &lt;- system("sas -SYSIN path/to/sas/script.sas")</code> </p>
  
  <p>but I can't seem to make it work. I have spent all a few hours on the Googles and decided to ask here. </p>
  
  <p>error message:</p>
  
  <pre><code>running command 'sas -SYSIN  C:/Desktop/test.sas' had status 127 
  </code></pre>
  
  <p>Thanks!</p>