<?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 Using macro variable in pipe in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Using-macro-variable-in-pipe/m-p/650629#M195119</link>
    <description>&lt;P&gt;I am just not getting something that should be obvious, so forgive my ignorance.&lt;/P&gt;&lt;P&gt;I have looked:&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Making-macro-variables-resolve-with-filename-pipe-command-with/td-p/436811" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Making-macro-variables-resolve-with-filename-pipe-command-with/td-p/436811&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/SAS-Macro-using-doubles-quotes-filename-pipe/td-p/146921" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/SAS-Macro-using-doubles-quotes-filename-pipe/td-p/146921&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/macro-variable-resolution-in-pipe/td-p/112978" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/macro-variable-resolution-in-pipe/td-p/112978&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/Macro-variable-in-filename-statement/td-p/343660" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/Macro-variable-in-filename-statement/td-p/343660&lt;/A&gt;&lt;/P&gt;&lt;P&gt;One would think that after that, I would have the solution, but no matter which combination I try, I'm not getting the right result:&lt;/P&gt;&lt;P&gt;So I want to replace this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME _FList PIPE 'dir "c:\Users\...\Study-data\Posts from 20* to 2020-*.XLSX" /b ';&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET DataDir=c:\Users\...\Study-data\;
FILENAME _FList1 PIPE 'dir &amp;amp;DataDir.Posts from 20* to 2020-*.XLSX /b';&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But no matter how I try to quote it, I am missing what I am sure is a pretty obvious solution.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
    <pubDate>Tue, 26 May 2020 08:22:59 GMT</pubDate>
    <dc:creator>JacquesR</dc:creator>
    <dc:date>2020-05-26T08:22:59Z</dc:date>
    <item>
      <title>Using macro variable in pipe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-macro-variable-in-pipe/m-p/650629#M195119</link>
      <description>&lt;P&gt;I am just not getting something that should be obvious, so forgive my ignorance.&lt;/P&gt;&lt;P&gt;I have looked:&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Making-macro-variables-resolve-with-filename-pipe-command-with/td-p/436811" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Making-macro-variables-resolve-with-filename-pipe-command-with/td-p/436811&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/SAS-Macro-using-doubles-quotes-filename-pipe/td-p/146921" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/SAS-Macro-using-doubles-quotes-filename-pipe/td-p/146921&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Procedures/macro-variable-resolution-in-pipe/td-p/112978" target="_blank"&gt;https://communities.sas.com/t5/SAS-Procedures/macro-variable-resolution-in-pipe/td-p/112978&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/General-SAS-Programming/Macro-variable-in-filename-statement/td-p/343660" target="_blank"&gt;https://communities.sas.com/t5/General-SAS-Programming/Macro-variable-in-filename-statement/td-p/343660&lt;/A&gt;&lt;/P&gt;&lt;P&gt;One would think that after that, I would have the solution, but no matter which combination I try, I'm not getting the right result:&lt;/P&gt;&lt;P&gt;So I want to replace this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;FILENAME _FList PIPE 'dir "c:\Users\...\Study-data\Posts from 20* to 2020-*.XLSX" /b ';&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;with this:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET DataDir=c:\Users\...\Study-data\;
FILENAME _FList1 PIPE 'dir &amp;amp;DataDir.Posts from 20* to 2020-*.XLSX /b';&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;But no matter how I try to quote it, I am missing what I am sure is a pretty obvious solution.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 08:22:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-macro-variable-in-pipe/m-p/650629#M195119</guid>
      <dc:creator>JacquesR</dc:creator>
      <dc:date>2020-05-26T08:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using macro variable in pipe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-macro-variable-in-pipe/m-p/650632#M195122</link>
      <description>&lt;P&gt;This is probably macro mistake #1 for macro newbies &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; Been there, done that &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whenever you want macro variables to resolve in a string, use double quotes instead of single quotes.&lt;/P&gt;</description>
      <pubDate>Tue, 26 May 2020 08:32:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-macro-variable-in-pipe/m-p/650632#M195122</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-05-26T08:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Using macro variable in pipe</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Using-macro-variable-in-pipe/m-p/650688#M195144</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET DataDir=c:\Users\...\Study-data\;
FILENAME _FList1 PIPE "dir ""&amp;amp;DataDir.Posts from 20* to 2020-*.XLSX"" /b";&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 May 2020 11:38:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Using-macro-variable-in-pipe/m-p/650688#M195144</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2020-05-26T11:38:33Z</dc:date>
    </item>
  </channel>
</rss>

