<?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 Running complex external system command from SAS / SCL in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Running-complex-external-system-command-from-SAS-SCL/m-p/149889#M262389</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to run this windows cmd instruction from SAS (when executed from cmd, it works perfectly fine) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for /f "usebackq tokens=2*" %i in (`svn st ^| findstr /R "^!"`) do svn del "%i"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now, tried everything: x, system from scl, quotations... nothing works - the issue seems to be the variables, which get interpreted as macro definitions, but there seems to be no way around that... Can anybody help me with that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Sep 2014 06:31:41 GMT</pubDate>
    <dc:creator>Nieumysl</dc:creator>
    <dc:date>2014-09-18T06:31:41Z</dc:date>
    <item>
      <title>Running complex external system command from SAS / SCL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-complex-external-system-command-from-SAS-SCL/m-p/149889#M262389</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to run this windows cmd instruction from SAS (when executed from cmd, it works perfectly fine) :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;for /f "usebackq tokens=2*" %i in (`svn st ^| findstr /R "^!"`) do svn del "%i"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Now, tried everything: x, system from scl, quotations... nothing works - the issue seems to be the variables, which get interpreted as macro definitions, but there seems to be no way around that... Can anybody help me with that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 06:31:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-complex-external-system-command-from-SAS-SCL/m-p/149889#M262389</guid>
      <dc:creator>Nieumysl</dc:creator>
      <dc:date>2014-09-18T06:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Running complex external system command from SAS / SCL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-complex-external-system-command-from-SAS-SCL/m-p/149890#M262390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nieumysl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tried this approach:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;filename cmd pipe "&amp;lt;your cmmand&amp;gt;" lrecl=2048;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile cmd;&lt;/P&gt;&lt;P&gt;&amp;nbsp; input;&lt;/P&gt;&lt;P&gt;&amp;nbsp; put _infile_;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The benefit here is that you can see the command-prompt messages in the sas-log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another approach that might be helpful is to write the command to a .bat or .cmd file.&lt;/P&gt;&lt;P&gt;and call the the bat/cmd from SAS in whatever way.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br, Jakob Hommelhoff&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 08:02:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-complex-external-system-command-from-SAS-SCL/m-p/149890#M262390</guid>
      <dc:creator>JakobHommelhoff</dc:creator>
      <dc:date>2014-09-18T08:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: Running complex external system command from SAS / SCL</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-complex-external-system-command-from-SAS-SCL/m-p/149891#M262391</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jakob! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; It works swimmingly :smileygrin:&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Sep 2014 10:40:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-complex-external-system-command-from-SAS-SCL/m-p/149891#M262391</guid>
      <dc:creator>Nieumysl</dc:creator>
      <dc:date>2014-09-18T10:40:17Z</dc:date>
    </item>
  </channel>
</rss>

