<?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 Reg:Shell X command. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reg-Shell-X-command/m-p/24282#M4062</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reg:Shell X command&lt;/P&gt;&lt;P&gt;Actually i want to execute sheel script if the day=6&lt;/P&gt;&lt;P&gt;i am doing like this&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;if &amp;amp;day=6;&lt;BR /&gt;then do;&lt;BR /&gt;x 'new.sh';&lt;BR /&gt;x 'old.sh';&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;If i keep like this is was working on all the days acutally &amp;amp;day i my macro variable&lt;BR /&gt;from a dataset it was not resoving properly how can i do it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 Mar 2012 10:26:41 GMT</pubDate>
    <dc:creator>My_SAS</dc:creator>
    <dc:date>2012-03-07T10:26:41Z</dc:date>
    <item>
      <title>Reg:Shell X command.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-Shell-X-command/m-p/24282#M4062</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reg:Shell X command&lt;/P&gt;&lt;P&gt;Actually i want to execute sheel script if the day=6&lt;/P&gt;&lt;P&gt;i am doing like this&lt;/P&gt;&lt;P&gt;data _null_;&lt;BR /&gt;if &amp;amp;day=6;&lt;BR /&gt;then do;&lt;BR /&gt;x 'new.sh';&lt;BR /&gt;x 'old.sh';&lt;BR /&gt;end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;If i keep like this is was working on all the days acutally &amp;amp;day i my macro variable&lt;BR /&gt;from a dataset it was not resoving properly how can i do it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 10:26:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-Shell-X-command/m-p/24282#M4062</guid>
      <dc:creator>My_SAS</dc:creator>
      <dc:date>2012-03-07T10:26:41Z</dc:date>
    </item>
    <item>
      <title>Reg:Shell X command.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-Shell-X-command/m-p/24283#M4063</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;My_SAS since the comparison is onmacro variable the condition should be macr condition and would involve macr if condition:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;%if &amp;amp;day=6;&lt;BR /&gt;%then %do;&lt;BR /&gt;x 'new.sh';&lt;BR /&gt;x 'old.sh';&lt;BR /&gt;%end;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try this.. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 10:41:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-Shell-X-command/m-p/24283#M4063</guid>
      <dc:creator>manojinpec</dc:creator>
      <dc:date>2012-03-07T10:41:50Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Shell X command.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-Shell-X-command/m-p/24284#M4064</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;actually is there any way for the x command to execute the shell script if it satisfy the contion i have given &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 11:05:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-Shell-X-command/m-p/24284#M4064</guid>
      <dc:creator>My_SAS</dc:creator>
      <dc:date>2012-03-07T11:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Reg:Shell X command.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-Shell-X-command/m-p/24285#M4065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; I have not tested this, but just looking at your code, it appears you have an extra semicolon. Try it without the semicolon after the "6". In other words:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;if &amp;amp;day = 6 then do;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Karl &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 13:08:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-Shell-X-command/m-p/24285#M4065</guid>
      <dc:creator>KarlK</dc:creator>
      <dc:date>2012-03-07T13:08:40Z</dc:date>
    </item>
    <item>
      <title>Reg:Shell X command.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reg-Shell-X-command/m-p/24286#M4066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;X statment cannot be executed from in a datastep.&amp;nbsp; It can be executed conditionally through a macro as shown above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a datastep, use call system, or call execute with the x command inside.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data _null_;&lt;/P&gt;&lt;P&gt; if &amp;amp;day=6 then do;&lt;/P&gt;&lt;P&gt; call system('/path/to/new.sh');&lt;/P&gt;&lt;P&gt;call execute('x /path/to/old.sh');&lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 Mar 2012 16:30:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reg-Shell-X-command/m-p/24286#M4066</guid>
      <dc:creator>FriedEgg</dc:creator>
      <dc:date>2012-03-07T16:30:33Z</dc:date>
    </item>
  </channel>
</rss>

