<?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: Executing a X Command with macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Executing-a-X-Command-with-macro/m-p/394833#M277973</link>
    <description>&lt;P&gt;Thank you so much!&amp;nbsp; I cannot believe I overlooked that.&lt;/P&gt;</description>
    <pubDate>Mon, 11 Sep 2017 18:04:55 GMT</pubDate>
    <dc:creator>Singham20</dc:creator>
    <dc:date>2017-09-11T18:04:55Z</dc:date>
    <item>
      <title>Executing a X Command with macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Executing-a-X-Command-with-macro/m-p/394786#M277971</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;&lt;P&gt;I am trying to copy and rename a bunch of files on my computer and thought X commands is the way to go.&amp;nbsp; I tried it and it worked perfectly however when I put in a Macro to do this it does not work.&amp;nbsp; it just saves the first file with the name stated and does not replace the "&amp;amp;name"&amp;nbsp; with name given.&amp;nbsp; Here is what I have written so far:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;%&lt;STRONG&gt;&lt;I&gt;FAST&lt;/I&gt;&lt;/STRONG&gt;(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2017&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,Carry,05T);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;　&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%macro&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; FAST(YEAR,SURVEY,MO);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;X &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;"copy ""C:\TestSASCode\&amp;amp;YEAR\&amp;amp;SURVEY\&amp;amp;MO\test.DAT"" ""C:\TestSASCode\SAS\&amp;amp;SURVEY_&amp;amp;YEAR_&amp;amp;MO_2017-carrier.DAT"" "&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;%mend&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;%&lt;STRONG&gt;&lt;I&gt;FAST&lt;/I&gt;&lt;/STRONG&gt;(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2017&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,Carry,01T);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;%&lt;STRONG&gt;&lt;I&gt;FAST&lt;/I&gt;&lt;/STRONG&gt;(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2017&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,Carry,02T);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;%&lt;STRONG&gt;&lt;I&gt;FAST&lt;/I&gt;&lt;/STRONG&gt;(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;2017&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;,Carry,03T);&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;I know it looks like I do not need the &amp;amp;Year and &amp;amp;survey because they are the same however I will be doing this for different year and surveys too.&amp;nbsp; I just wanted the question to be simple.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;What do you guys think I should do?&amp;nbsp; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;Thank you!&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 17:52:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Executing-a-X-Command-with-macro/m-p/394786#M277971</guid>
      <dc:creator>Singham20</dc:creator>
      <dc:date>2017-09-11T17:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: Executing a X Command with macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Executing-a-X-Command-with-macro/m-p/394789#M277972</link>
      <description>&lt;P&gt;Add periods after the macro variables.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you run the code with the following the log will have more information that helps with debugging.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;options mprint symbolgen;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;amp;SURVEY&lt;FONT size="7" color="#FF0000"&gt;.&lt;/FONT&gt;_&amp;amp;YEAR&lt;FONT size="7" color="#FF0000"&gt;.&lt;/FONT&gt;_&amp;amp;MO&lt;FONT size="5" color="#FF0000"&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 17:57:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Executing-a-X-Command-with-macro/m-p/394789#M277972</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-09-11T17:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Executing a X Command with macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Executing-a-X-Command-with-macro/m-p/394833#M277973</link>
      <description>&lt;P&gt;Thank you so much!&amp;nbsp; I cannot believe I overlooked that.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Sep 2017 18:04:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Executing-a-X-Command-with-macro/m-p/394833#M277973</guid>
      <dc:creator>Singham20</dc:creator>
      <dc:date>2017-09-11T18:04:55Z</dc:date>
    </item>
  </channel>
</rss>

