<?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: Wrong command in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Wrong-command/m-p/840754#M332429</link>
    <description>&lt;P&gt;Source and target of the move command are identical, so this will in effect do nothing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, don't use the X statement if you want to know what an external command does, use a PIPE:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
infile pipe "mv source target 2&amp;gt;&amp;amp;1";
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The 2&amp;gt;&amp;amp;1 reroutes stderr to stdout, so the data step can read all messages originating from the external comnand and write them to the SAS log.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Oct 2022 06:48:57 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-10-26T06:48:57Z</dc:date>
    <item>
      <title>Wrong command</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wrong-command/m-p/840743#M332423</link>
      <description>X”mv &amp;amp;G_IFC_STG_PATH./map671.sas7bdat &amp;amp;G_IFC_STG_PATH./map671.sas7bdat”;&lt;BR /&gt;&lt;BR /&gt;Is this command valid? Not renaming or moving to another directory...</description>
      <pubDate>Wed, 26 Oct 2022 04:00:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wrong-command/m-p/840743#M332423</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2022-10-26T04:00:46Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong command</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wrong-command/m-p/840749#M332427</link>
      <description>&lt;P&gt;First, run "options mprint symbolgen;" to get the command string that resolve the macro variable and check if it executes correctly as a command.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that the command presented will not be moved or renamed since the first and second parameters are the same file path.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 05:12:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wrong-command/m-p/840749#M332427</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2022-10-26T05:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: Wrong command</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Wrong-command/m-p/840754#M332429</link>
      <description>&lt;P&gt;Source and target of the move command are identical, so this will in effect do nothing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, don't use the X statement if you want to know what an external command does, use a PIPE:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
infile pipe "mv source target 2&amp;gt;&amp;amp;1";
input;
put _infile_;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The 2&amp;gt;&amp;amp;1 reroutes stderr to stdout, so the data step can read all messages originating from the external comnand and write them to the SAS log.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 06:48:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Wrong-command/m-p/840754#M332429</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-10-26T06:48:57Z</dc:date>
    </item>
  </channel>
</rss>

