<?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: Macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable/m-p/205809#M38269</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, please show your INFILE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that is really the error message you are getting, I would guess maybe your infile statement looks something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile '/usr/sas/.../SASApp_STPServer_"&amp;amp;filedate"_tmptcmsaslva1_*.log';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The single quotes would keep &amp;amp;filedate from resolving.&amp;nbsp;&amp;nbsp; And you don't want double quotes in the middle of your file name.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Aug 2015 15:26:07 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2015-08-24T15:26:07Z</dc:date>
    <item>
      <title>Macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable/m-p/205805#M38265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See the log below. Can someone tell me how to call this macro variable in infile statement? Because I could not resolve the macro variable as per the log below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %let filedate=%sysfunc(putn("&amp;amp;sysdate9"d-1,yymmdd10.));&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; %put &amp;amp;filedate;&lt;/P&gt;&lt;P&gt;2015-08-23&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ERROR: Physical file does not exist, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /usr/sas/sas_config/Lev1/SASApp/StoredProcessServer/Logs/SASApp_STPServer_&lt;STRONG&gt;"&amp;amp;filedate"&lt;/STRONG&gt;_tmptcmsaslva2_*.log.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: I copy\paste only the required log and NOT everything.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 14:10:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable/m-p/205805#M38265</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2015-08-24T14:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable/m-p/205806#M38266</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't tell from the code you have given, how the infile statement looks.&amp;nbsp; It should look like:&lt;/P&gt;&lt;P&gt;infile "abc\def\&amp;amp;FILEDATE._tmp.csv";&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, why do you need the macro variable at all? &lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;infile "abc\def\&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;%sysfunc(putn("&amp;amp;sysdate9"d-1,yymmdd10.))&lt;/SPAN&gt;_tmp.csv";&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 14:16:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable/m-p/205806#M38266</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-08-24T14:16:56Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable/m-p/205807#M38267</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your error message could be interpreted as not a macro variable error, it could mean your macro variable has worked properly and your infile statement points to a file that doesn't exist.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would help if you showed us the INFILE statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 14:44:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable/m-p/205807#M38267</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2015-08-24T14:44:54Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable/m-p/205808#M38268</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like you used single quotes in the INFILE statement, so the macro variable was not expanded. Also I doubt the you want the double quote characters embedded into the filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 14pt;"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;infile "/usr/sas/sas_config/Lev1/SASApp/StoredProcessServer/Logs/SASApp_STPServer_&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;&lt;STRONG&gt;&amp;amp;filedate.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff;"&gt;_tmptcmsaslva2_*.log" ... &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 15:20:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable/m-p/205808#M38268</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-08-24T15:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro-variable/m-p/205809#M38269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, please show your INFILE statement.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that is really the error message you are getting, I would guess maybe your infile statement looks something like:&lt;/P&gt;&lt;P&gt;&amp;nbsp; infile '/usr/sas/.../SASApp_STPServer_"&amp;amp;filedate"_tmptcmsaslva1_*.log';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The single quotes would keep &amp;amp;filedate from resolving.&amp;nbsp;&amp;nbsp; And you don't want double quotes in the middle of your file name.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 15:26:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro-variable/m-p/205809#M38269</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2015-08-24T15:26:07Z</dc:date>
    </item>
  </channel>
</rss>

