<?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: SAS Macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro/m-p/774925#M246322</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/154786"&gt;@PetePatel&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks PaigeMiller. The variables need to be dropped within the set statement as they are causing issues when trying to set together. Your second macro code is what I was after.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If the particular issue(s) were mismatched variable types or lengths of character variables it may be time to address how the data sets are created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the issue was just data set size that's another story.&lt;/P&gt;</description>
    <pubDate>Mon, 18 Oct 2021 16:10:15 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-10-18T16:10:15Z</dc:date>
    <item>
      <title>SAS Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro/m-p/774915#M246317</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 100 large datasets (a,b,c,d,e...) and 50 variables that I need to exclude from those datasets in a set statement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I set up a Macro to efficiently exclude these from each dataset before creating the final dataset 'want'?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;variables to exclude:&lt;/P&gt;&lt;P&gt;d1, d2, d3, f1, f4, g7, h9...etc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set&lt;/P&gt;&lt;P&gt;a&lt;/P&gt;&lt;P&gt;b&lt;/P&gt;&lt;P&gt;c&lt;/P&gt;&lt;P&gt;d&lt;/P&gt;&lt;P&gt;e&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 15:33:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro/m-p/774915#M246317</guid>
      <dc:creator>PetePatel</dc:creator>
      <dc:date>2021-10-18T15:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro/m-p/774920#M246319</link>
      <description>&lt;P&gt;No macro needed&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set a b c d e ... ;
    drop d1 d2 d3 f1 f4 ...;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or if you really want to improve the efficiency of the execution time (Again no macro needed but a macro variable ... which is not a macro ... is used)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let excl = (drop=d1 d3 d3 f1 f4 ...);
data want;
    set a&amp;amp;excl b&amp;amp;excl c&amp;amp;excl ...
run;
    &lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 16:00:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro/m-p/774920#M246319</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-18T16:00:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro/m-p/774922#M246320</link>
      <description>&lt;P&gt;Thanks PaigeMiller. The variables need to be dropped within the set statement as they are causing issues when trying to set together. Your second macro code is what I was after.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 16:05:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro/m-p/774922#M246320</guid>
      <dc:creator>PetePatel</dc:creator>
      <dc:date>2021-10-18T16:05:37Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro/m-p/774924#M246321</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/154786"&gt;@PetePatel&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks PaigeMiller. The variables need to be dropped within the set statement as they are causing issues when trying to set together. Your second macro code is what I was after.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Great. But there are no macros here. There is a macro variable, which is not a macro.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 16:10:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro/m-p/774924#M246321</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-10-18T16:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: SAS Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-Macro/m-p/774925#M246322</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/154786"&gt;@PetePatel&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thanks PaigeMiller. The variables need to be dropped within the set statement as they are causing issues when trying to set together. Your second macro code is what I was after.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If the particular issue(s) were mismatched variable types or lengths of character variables it may be time to address how the data sets are created.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If the issue was just data set size that's another story.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Oct 2021 16:10:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-Macro/m-p/774925#M246322</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-18T16:10:15Z</dc:date>
    </item>
  </channel>
</rss>

