<?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: Macros in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/498915#M132668</link>
    <description>&lt;P&gt;&amp;nbsp;the first code provides this log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: There were 7 observations read from the data set WORK.MYDATA1707.&lt;BR /&gt;NOTE: There were 2 observations read from the data set WORK.MYDATA1708.&lt;BR /&gt;NOTE: There were 6 observations read from the data set WORK.MYDATA1709.&lt;BR /&gt;NOTE: There were 4 observations read from the data set WORK.MYDATA1710.&lt;BR /&gt;NOTE: There were 5 observations read from the data set WORK.MYDATA1711.&lt;BR /&gt;NOTE: There were 3 observations read from the data set WORK.MYDATA1801.&lt;BR /&gt;NOTE: There were 1 observations read from the data set WORK.MYDATA1802.&lt;BR /&gt;NOTE: There were 3 observations read from the data set WORK.MYDATA1803.&lt;BR /&gt;NOTE: There were 2 observations read from the data set WORK.MYDATA1804.&lt;BR /&gt;NOTE: There were 2 observations read from the data set WORK.MYDATA1806.&lt;BR /&gt;NOTE: The data set WORK.ALL_MYDATA has 35 observations and 52 variables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the second code provides this log when I try to use a macro.&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: No rows were selected.&lt;/P&gt;</description>
    <pubDate>Wed, 26 Sep 2018 02:04:50 GMT</pubDate>
    <dc:creator>VDD</dc:creator>
    <dc:date>2018-09-26T02:04:50Z</dc:date>
    <item>
      <title>Macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/498903#M132663</link>
      <description>&lt;P&gt;The code I have below works find.&amp;nbsp; While, I would like to replace the MYDATA&amp;nbsp;for the like conduction with a macro.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql ;		
	/* get all my dataset file names into a macro var */
	select 		
		trim(libname) || '.' || memname into :dataset_vars separated by ' '
	from dictionary.tables
	where upcase(libname)="WORK"
	and upcase(memname) like 'MYDATA%' 
	;
quit;
/* stack my datasets */
data ALL_MYDATA;
	set &amp;amp;dataset_vars;* (drop=month);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;When I use this code I get an error no rows were selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%LET myvar = MYDATA;
proc sql ;		
	/* get all my dataset file names into a macro var */
	select 		
		trim(libname) || '.' || memname into :dataset_vars separated by ' '
	from dictionary.tables
	where upcase(libname)="WORK"
	and upcase(memname) like '&amp;amp;MYVAR.%' 
	;
quit;
/* stack my datasets */
data ALL_MYDATA;
	set &amp;amp;dataset_vars;* (drop=month);
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;What changes do I need to make for this code to work correctly and fetch my data.&lt;/P&gt;&lt;P&gt;Thank you for any assistance or suggestions.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 01:13:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/498903#M132663</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-09-26T01:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: Macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/498914#M132667</link>
      <description>&lt;P&gt;log plz. error notes?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 01:59:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/498914#M132667</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-26T01:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: Macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/498915#M132668</link>
      <description>&lt;P&gt;&amp;nbsp;the first code provides this log:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: There were 7 observations read from the data set WORK.MYDATA1707.&lt;BR /&gt;NOTE: There were 2 observations read from the data set WORK.MYDATA1708.&lt;BR /&gt;NOTE: There were 6 observations read from the data set WORK.MYDATA1709.&lt;BR /&gt;NOTE: There were 4 observations read from the data set WORK.MYDATA1710.&lt;BR /&gt;NOTE: There were 5 observations read from the data set WORK.MYDATA1711.&lt;BR /&gt;NOTE: There were 3 observations read from the data set WORK.MYDATA1801.&lt;BR /&gt;NOTE: There were 1 observations read from the data set WORK.MYDATA1802.&lt;BR /&gt;NOTE: There were 3 observations read from the data set WORK.MYDATA1803.&lt;BR /&gt;NOTE: There were 2 observations read from the data set WORK.MYDATA1804.&lt;BR /&gt;NOTE: There were 2 observations read from the data set WORK.MYDATA1806.&lt;BR /&gt;NOTE: The data set WORK.ALL_MYDATA has 35 observations and 52 variables&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the second code provides this log when I try to use a macro.&amp;nbsp;&lt;/P&gt;&lt;P&gt;NOTE: No rows were selected.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 02:04:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/498915#M132668</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-09-26T02:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/498916#M132669</link>
      <description>&lt;P&gt;make this change&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;"&amp;amp;MYVAR.%"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;to double quotes and test again&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 02:04:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/498916#M132669</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-09-26T02:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/498917#M132670</link>
      <description>&lt;P&gt;Macro references within single quotes do not get resolved:&amp;nbsp; like '&amp;amp;MYVAR.%'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Switch to double quotes:&amp;nbsp; like "&amp;amp;MYVAR.%"&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 02:05:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/498917#M132670</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-09-26T02:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Macros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/498918#M132671</link>
      <description>&lt;P&gt;That worked.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/138205"&gt;@novinosrin&lt;/a&gt; and&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt; for the reminder to use double quotes for resolving macros.&amp;nbsp; It must be getting late and I am just overlooked and forgetting.&amp;nbsp; Thank both of you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Sep 2018 02:12:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macros/m-p/498918#M132671</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-09-26T02:12:13Z</dc:date>
    </item>
  </channel>
</rss>

