<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How do I execute SAS from EMACS ESS(SAS) in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632290#M77799</link>
    <description>&lt;P&gt;Why do you use forward slashes in your command?&lt;/P&gt;</description>
    <pubDate>Sun, 15 Mar 2020 23:27:14 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2020-03-15T23:27:14Z</dc:date>
    <item>
      <title>How do I execute SAS from EMACS ESS(SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/629014#M77612</link>
      <description>&lt;P&gt;I'm a long-time SAS user, but an EMACS newbie. Having successfully&lt;BR /&gt;installed Vincent Goulet's EMACS Modified for Windows on my WIN10 64 bit&lt;BR /&gt;system, I'm now trying to install EMACS ESS for SAS. Part of this seems&lt;BR /&gt;to be working, because I now get colorized text in my SAS source code&lt;BR /&gt;files. But I don't seem to be able to execute SAS inself. Part of what&lt;BR /&gt;is evidently required here is for me to define SAS to ESS by putting the&lt;BR /&gt;following line in my .EMACS file:&lt;/P&gt;&lt;P&gt;(setq ess-sas-submit-command "C:/program files (x86)/SAS Institute/SAS/V9/sas.exe")&lt;/P&gt;&lt;P&gt;I've done this, but when I load a SAS file into a buffer and type&lt;/P&gt;&lt;P&gt;M-x ess-sas-submit-command&lt;/P&gt;&lt;P&gt;I get the response&lt;/P&gt;&lt;P&gt;[No Match]&lt;/P&gt;&lt;P&gt;This has me stumped. I know the DOS command to run SAS works on my system,&lt;BR /&gt;because I've tried it. Does anyone have a suggestion?&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2020 03:51:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/629014#M77612</guid>
      <dc:creator>nlen</dc:creator>
      <dc:date>2020-03-03T03:51:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do I execute SAS from EMACS ESS(SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632290#M77799</link>
      <description>&lt;P&gt;Why do you use forward slashes in your command?&lt;/P&gt;</description>
      <pubDate>Sun, 15 Mar 2020 23:27:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632290#M77799</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-03-15T23:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: How do I execute SAS from EMACS ESS(SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632312#M77800</link>
      <description>&lt;P&gt;Hi Chris - thanks for your response.&amp;nbsp; I thought that was what I was supposed to do.&amp;nbsp; Should I use something else?&amp;nbsp; I tried double forward slashes and got the same error message.&amp;nbsp; I tried reverse slashes and got "error: invalid escape character sequence" on loading emacs.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Mar 2020 02:59:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632312#M77800</guid>
      <dc:creator>nlen</dc:creator>
      <dc:date>2020-03-16T02:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I execute SAS from EMACS ESS(SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632314#M77801</link>
      <description>&lt;P&gt;I think the quotes you have are being read by the lisp processor.&amp;nbsp; You need to include quotes for the Windows/DOS command processor also because your path includes spaces.&amp;nbsp; Not sure if lisp use an escape character, like Unix command shell.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;(setq ess-sas-submit-command "\"C:/program files (x86)/SAS Institute/SAS/V9/sas.exe\"")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Or doubles the quotes, like SAS.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;(setq ess-sas-submit-command """C:/program files (x86)/SAS Institute/SAS/V9/sas.exe""")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You also might need to use \ to escape the \ in your DOS command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;(setq ess-sas-submit-command "\"C:\\program files (x86)\\SAS Institute\\SAS\\V9\\sas.exe\"")&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 16 Mar 2020 03:37:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632314#M77801</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-16T03:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I execute SAS from EMACS ESS(SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632536#M77818</link>
      <description>Hi Tom -&lt;BR /&gt;&lt;BR /&gt;Thanks for your suggestions. Unfortunately, no luck. That is, for the&lt;BR /&gt;first and third suggestions, I still get [no match] when trying to&lt;BR /&gt;execute ess-sas-submit-command.&lt;BR /&gt;&lt;BR /&gt;For the second suggestion, I get the following error message on loading&lt;BR /&gt;emacs:&lt;BR /&gt;&lt;BR /&gt;Warning (initialization): An error occurred while loading&lt;BR /&gt;'c:/Users/nleno/.emacs' Wrong type argument" sym,bolp. C:program files&lt;BR /&gt;(x86)/SAS Institute/SAS/V9/sas.exe&lt;BR /&gt;</description>
      <pubDate>Mon, 16 Mar 2020 22:31:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632536#M77818</guid>
      <dc:creator>nlen</dc:creator>
      <dc:date>2020-03-16T22:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: How do I execute SAS from EMACS ESS(SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632544#M77819</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;made 2 suggestions for change:&lt;/P&gt;
&lt;P&gt;- Quote the complete path since it contains spaces&lt;/P&gt;
&lt;P&gt;- Use \, not /, and escape it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;He showed various ways to do this, since different environments use different syntaxes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You must implement &lt;STRONG&gt;both&lt;/STRONG&gt; suggestions: quote the path, and use \ instead of /.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 00:02:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632544#M77819</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-03-17T00:02:12Z</dc:date>
    </item>
    <item>
      <title>Re: How do I execute SAS from EMACS ESS(SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632557#M77824</link>
      <description>&lt;P&gt;Hi Chris -&lt;/P&gt;&lt;P&gt;I executed Tom's suggestions exactly as he wrote them.&lt;/P&gt;&lt;P&gt;If you have other ideas, please quote them, and I will try them, too.&lt;/P&gt;&lt;P&gt;Neal&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 02:54:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632557#M77824</guid>
      <dc:creator>nlen</dc:creator>
      <dc:date>2020-03-17T02:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I execute SAS from EMACS ESS(SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632567#M77825</link>
      <description>&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;I executed Tom's suggestions exactly as he wrote them.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;That's my point exactly. He suggested corrections for quoting, and then for using the \. Separately.&lt;/P&gt;
&lt;P&gt;You have to use both.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&amp;gt;&amp;nbsp;If you have other ideas, please quote them, and I will try them, too.&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;Why don't you try? You might learn something.&lt;/P&gt;
&lt;P&gt;Plus we can't guess the exact syntax that will work for your exact case.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 20:48:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632567#M77825</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-03-18T20:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: How do I execute SAS from EMACS ESS(SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632725#M77843</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/314283"&gt;@nlen&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi Chris -&lt;/P&gt;
&lt;P&gt;I executed Tom's suggestions exactly as he wrote them.&lt;/P&gt;
&lt;P&gt;If you have other ideas, please quote them, and I will try them, too.&lt;/P&gt;
&lt;P&gt;Neal&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Does Windows still support shortnames for folders/files with goofy invalid characters like spaces in them?&amp;nbsp; That is how the example in the documentation does it.&amp;nbsp;&amp;nbsp;&lt;A href="http://ess.r-project.org/Manual/ess.html#ESS_0028SAS_0029_002d_002dBatch-SAS-processes" target="_blank" rel="noopener"&gt;http://ess.r-project.org/Manual/ess.html#ESS_0028SAS_0029_002d_002dBatch-SAS-processes&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;;Windows example
(setq-default ess-sas-submit-command "c:\\progra~1\\sas\\sas.exe")&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Notice the progra~1&amp;nbsp; that is the shortname for the Program Files.&lt;/P&gt;
&lt;P&gt;The /X option on the DIR command should let you find the shortname for&amp;nbsp;&lt;STRONG&gt;your&lt;/STRONG&gt; SAS version on&amp;nbsp;&lt;STRONG&gt;your&lt;/STRONG&gt; PC.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Mar 2020 16:50:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/632725#M77843</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-03-17T16:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I execute SAS from EMACS ESS(SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/633068#M77854</link>
      <description>&lt;P&gt;Boy, Tom, I really&amp;nbsp;thought that was going to be it.&amp;nbsp;&lt;BR /&gt;But again, I get the dreaded [no match] response.&lt;BR /&gt;On my system, I used:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(setq-default ess-sas-submit-command "c:\\PROGRA~2\\SASINS~1\\SAS\\V9\\sas.exe")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know the quoted part works, because it loaded SAS when I put it in a .bat file.&lt;BR /&gt;Thanks for the suggestion!&lt;BR /&gt;Neal&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 19:52:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/633068#M77854</guid>
      <dc:creator>nlen</dc:creator>
      <dc:date>2020-03-18T19:52:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I execute SAS from EMACS ESS(SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/633071#M77855</link>
      <description>&lt;P&gt;PS:&lt;/P&gt;&lt;P&gt;I also tried&lt;/P&gt;&lt;P&gt;(setq ess-sas-submit-command "\"c:\\PROGRA~2\\SASINS~1\\SAS\\V9\\sas.exe\"")&lt;/P&gt;&lt;P&gt;No soap.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 20:04:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/633071#M77855</guid>
      <dc:creator>nlen</dc:creator>
      <dc:date>2020-03-18T20:04:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I execute SAS from EMACS ESS(SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/633082#M77856</link>
      <description>&lt;P&gt;This &lt;A href="https://ess.r-project.org/Manual/ess.html" target="_self"&gt;page&lt;/A&gt; suggests that the command should use &lt;FONT face="courier new,courier"&gt;setq-default&lt;/FONT&gt;&lt;/P&gt;
&lt;PRE class="example"&gt;(setq-default ess-sas-submit-command "c:\\progra~1\\sas\\sas.exe")&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;not&amp;nbsp;&lt;FONT face="courier new,courier"&gt;setq&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Mar 2020 20:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/633082#M77856</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2020-03-18T20:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I execute SAS from EMACS ESS(SAS)</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/677082#M79360</link>
      <description>&lt;P&gt;This was quite troublesome for me too (Windows 10, Emacs from Vincent Goulet). The tip from Tom was very helpful (finding the shortnames in Windows 10 with dir /X). What eventually worked for me was&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;a) using the F3/F4/F5/&amp;nbsp; keys (not the commands in de ESS menu)&lt;/P&gt;&lt;P&gt;b) after having the following in my&amp;nbsp; .../.emacs.d/init.el&amp;nbsp; file:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(setq ess-sas-local-unix-keys t)&lt;/P&gt;&lt;P&gt;(setq-default ess-sas-submit-command "C:\\PROGRA~1\\SASHome\\SASFoundation\\9.4\\sas.exe")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then on opening a SAS file in Emacs, ESS-mode is loaded and after pressing F3 the program is run... but I have to wait 5 seconds before it starts (next times it works faster).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The shell buffer gives me the following code:&lt;/P&gt;&lt;P&gt;*** start screenshot ***&lt;/P&gt;&lt;P&gt;Microsoft Windows [Version 10.0.18362.1016]&lt;BR /&gt;(c) 2019 Microsoft Corporation. All rights reserved.&lt;/P&gt;&lt;P&gt;c:\Users\Steven\Desktop\emacs and SAS&amp;gt;c:&lt;BR /&gt;cd "c:/Users/Steven/Desktop/emacs and SAS/"&lt;BR /&gt;start C:\PROGRA~1\SASHome\SASFoundation\9.4\sas.exe -sysin "test" -rsasuser -icon&lt;BR /&gt;c:&lt;/P&gt;&lt;P&gt;c:\Users\Steven\Desktop\emacs and SAS&amp;gt;cd "c:/Users/Steven/Desktop/emacs and SAS/"&lt;/P&gt;&lt;P&gt;c:\Users\Steven\Desktop\emacs and SAS&amp;gt;start C:\PROGRA~1\SASHome\SASFoundation\9.4\sas.exe -sysin "test" -rsasuser -icon&lt;/P&gt;&lt;P&gt;c:\Users\Steven\Desktop\emacs and SAS&amp;gt;&lt;/P&gt;&lt;P&gt;*** end screen shot ***&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Apparently the&amp;nbsp;&lt;/P&gt;&lt;PRE class="example"&gt;;'ms-dos default
(setq ess-sas-submit-pre-command "start")
;'ms-dos default
(setq ess-sas-submit-post-command "-rsasuser -icon")&lt;/PRE&gt;&lt;P&gt;are used as well to run SAS.&lt;/P&gt;&lt;P&gt;From what I get from what I found on the internet, interactive mode will not work with Windows, only the above batch mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Aug 2020 16:05:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-do-I-execute-SAS-from-EMACS-ESS-SAS/m-p/677082#M79360</guid>
      <dc:creator>StevenT</dc:creator>
      <dc:date>2020-08-16T16:05:46Z</dc:date>
    </item>
  </channel>
</rss>

