<?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 SAS macro - to creating multiple tables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-to-creating-multiple-tables/m-p/787102#M251420</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create multiple tables by using the SAS macro.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*Create test_a and test_b tables by using the sas macro*/
/*test_a should keep only type variable in the output*/
/*test_b should keep only make variable in the output*/

%macro test1(test=, req=);
data count_by_"&amp;amp;test1.";
	set sashelp.cars(keep= req.);
run;
%mend;
%test1(test=test_a, req=type);
%test1(test=test_b, req=make);

&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 22 Dec 2021 13:54:30 GMT</pubDate>
    <dc:creator>dht115</dc:creator>
    <dc:date>2021-12-22T13:54:30Z</dc:date>
    <item>
      <title>SAS macro - to creating multiple tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-to-creating-multiple-tables/m-p/787102#M251420</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create multiple tables by using the SAS macro.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;/*Create test_a and test_b tables by using the sas macro*/
/*test_a should keep only type variable in the output*/
/*test_b should keep only make variable in the output*/

%macro test1(test=, req=);
data count_by_"&amp;amp;test1.";
	set sashelp.cars(keep= req.);
run;
%mend;
%test1(test=test_a, req=type);
%test1(test=test_b, req=make);

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Dec 2021 13:54:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-to-creating-multiple-tables/m-p/787102#M251420</guid>
      <dc:creator>dht115</dc:creator>
      <dc:date>2021-12-22T13:54:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS macro - to creating multiple tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-macro-to-creating-multiple-tables/m-p/787103#M251421</link>
      <description>&lt;UL&gt;
&lt;LI&gt;quotes are not allowed in dataset names&lt;/LI&gt;
&lt;LI&gt;make sure you use the correct name (test &amp;lt;&amp;gt; test1!)&lt;/LI&gt;
&lt;LI&gt;macro parameters must always be addressed like macro variables, with a leading ampersand&lt;/LI&gt;
&lt;/UL&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%macro test1(test=, req=);
data count_by_&amp;amp;test.;
set sashelp.cars(keep=&amp;amp;req.);
run;
%mend;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Dec 2021 14:01:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-macro-to-creating-multiple-tables/m-p/787103#M251421</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-12-22T14:01:12Z</dc:date>
    </item>
  </channel>
</rss>

