<?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: Resolving a Macro Variable inside of a infile statement odd occurance in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Resolving-a-Macro-Variable-inside-of-a-infile-statement-odd/m-p/411265#M100539</link>
    <description>&lt;P&gt;Add a period after the &amp;amp;J -&amp;gt; otherwise the compiler doesn't know where your macro variable name ends, so it won't resolve properly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ie you see:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"C:\location\Prac&lt;FONT size="5" color="#FF0000"&gt;&amp;amp;j&lt;/FONT&gt;_simple_toothhistory..csv"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;the compiler sees:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"C:\location\Prac&lt;FONT size="5"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;&amp;amp;j_simple_toothhistory.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;.csv"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note the double period before the CSV name. One of those was for the macro variable to resolve properly but you didn't move it with the macro variable.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Correct:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"C:\location\Prac&lt;FONT size="5" color="#339966"&gt;&amp;amp;j.&lt;/FONT&gt;_simple_toothhistory&lt;FONT size="5" color="#339966"&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/FONT&gt;csv"&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Nov 2017 17:25:11 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-11-07T17:25:11Z</dc:date>
    <item>
      <title>Resolving a Macro Variable inside of a infile statement odd occurance</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Resolving-a-Macro-Variable-inside-of-a-infile-statement-odd/m-p/411262#M100536</link>
      <description>&lt;P&gt;I am having a Strange situation which I was hoping someone could explain why it is occurring.&amp;nbsp; I am trying to use a simple macro variable to count from 1 to 57 in order to import 57 files.&lt;/P&gt;&lt;P&gt;I initially was given files with the name "Simple_toothhistory_1" "Simple.....2" etc.&lt;/P&gt;&lt;P&gt;I used the variable j and had a working macro using "C:\location\Simple_toothhistory_&amp;amp;j..csv"&lt;/P&gt;&lt;P&gt;An issue was found with the files and they were re-converted into csv files with a new name "Prac1_simple_toothhistory" "Prac2_....."&lt;/P&gt;&lt;P&gt;etc.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use the macro"C:\location\Prac&amp;amp;j_simple_toothhistory..csv"&lt;/P&gt;&lt;P&gt;but with no luck.&amp;nbsp; I also tried adding an additional underscore "C:\location\Prac_&amp;amp;j_simple_toothhistory..csv"&lt;/P&gt;&lt;P&gt;But this also did not work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have at this point renamed all 57 files &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp; But I was hoping to understand why it is working at the end but not within the file name!&lt;/P&gt;&lt;P&gt;Thanks!!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 17:11:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Resolving-a-Macro-Variable-inside-of-a-infile-statement-odd/m-p/411262#M100536</guid>
      <dc:creator>mlapradd</dc:creator>
      <dc:date>2017-11-07T17:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Resolving a Macro Variable inside of a infile statement odd occurance</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Resolving-a-Macro-Variable-inside-of-a-infile-statement-odd/m-p/411265#M100539</link>
      <description>&lt;P&gt;Add a period after the &amp;amp;J -&amp;gt; otherwise the compiler doesn't know where your macro variable name ends, so it won't resolve properly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ie you see:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"C:\location\Prac&lt;FONT size="5" color="#FF0000"&gt;&amp;amp;j&lt;/FONT&gt;_simple_toothhistory..csv"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;the compiler sees:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"C:\location\Prac&lt;FONT size="5"&gt;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;&amp;amp;j_simple_toothhistory.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/FONT&gt;.csv"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Note the double period before the CSV name. One of those was for the macro variable to resolve properly but you didn't move it with the macro variable.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Correct:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;"C:\location\Prac&lt;FONT size="5" color="#339966"&gt;&amp;amp;j.&lt;/FONT&gt;_simple_toothhistory&lt;FONT size="5" color="#339966"&gt;&lt;STRONG&gt;.&lt;/STRONG&gt;&lt;/FONT&gt;csv"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Nov 2017 17:25:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Resolving-a-Macro-Variable-inside-of-a-infile-statement-odd/m-p/411265#M100539</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-07T17:25:11Z</dc:date>
    </item>
  </channel>
</rss>

