<?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 macro code is not executing in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/macro-code-is-not-executing/m-p/900953#M40152</link>
    <description>&lt;P&gt;&lt;BR /&gt;%macro carmake(Make= , Models=);&lt;BR /&gt;data cars;&lt;BR /&gt;set sashelp.cars;&lt;BR /&gt;where Make in (&amp;amp;make)and Model in (&amp;amp;models); &lt;BR /&gt;run;&lt;BR /&gt;%mend;&lt;/P&gt;
&lt;P&gt;%carmake(Make= "Acura" "Audi" "BMW" "Hyundai", Models= "SUV" "Sedan");&lt;/P&gt;</description>
    <pubDate>Tue, 31 Oct 2023 19:36:18 GMT</pubDate>
    <dc:creator>animesh123</dc:creator>
    <dc:date>2023-10-31T19:36:18Z</dc:date>
    <item>
      <title>macro code is not executing</title>
      <link>https://communities.sas.com/t5/New-SAS-User/macro-code-is-not-executing/m-p/900953#M40152</link>
      <description>&lt;P&gt;&lt;BR /&gt;%macro carmake(Make= , Models=);&lt;BR /&gt;data cars;&lt;BR /&gt;set sashelp.cars;&lt;BR /&gt;where Make in (&amp;amp;make)and Model in (&amp;amp;models); &lt;BR /&gt;run;&lt;BR /&gt;%mend;&lt;/P&gt;
&lt;P&gt;%carmake(Make= "Acura" "Audi" "BMW" "Hyundai", Models= "SUV" "Sedan");&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 19:36:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/macro-code-is-not-executing/m-p/900953#M40152</guid>
      <dc:creator>animesh123</dc:creator>
      <dc:date>2023-10-31T19:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: macro code is not executing</title>
      <link>https://communities.sas.com/t5/New-SAS-User/macro-code-is-not-executing/m-p/900955#M40153</link>
      <description>&lt;P&gt;Not executing? Why do you say so?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I submit, I get a dataset with zero observations in return!&lt;/P&gt;
&lt;P&gt;So, it works !&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 19:41:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/macro-code-is-not-executing/m-p/900955#M40153</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2023-10-31T19:41:42Z</dc:date>
    </item>
    <item>
      <title>Re: macro code is not executing</title>
      <link>https://communities.sas.com/t5/New-SAS-User/macro-code-is-not-executing/m-p/900960#M40154</link>
      <description>&lt;P&gt;Last time I looked at the SASHELP.CARS data set the variable TYPE had values like "SUV" and "Sedan".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Model has stuff like "RSX Type S 2dr".&lt;/P&gt;
&lt;P&gt;So expect 0 observations in the result using Model that way.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 19:58:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/macro-code-is-not-executing/m-p/900960#M40154</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-10-31T19:58:39Z</dc:date>
    </item>
    <item>
      <title>Re: macro code is not executing</title>
      <link>https://communities.sas.com/t5/New-SAS-User/macro-code-is-not-executing/m-p/900974#M40157</link>
      <description>&lt;P&gt;Part of the problem is that you did not follow the general recommended advice, to first create code that works properly without macro variables and without macros. Had you done that, perhaps you would have figured out the problem, and then your macro would work properly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But without macro variables and without macros, your code is this&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data cars;
set sashelp.cars;
where Make in ( "Acura" "Audi" "BMW" "Hyundai") and Model in ("SUV" "Sedan");
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which doesn't work the way you want either. It returns an empty data set.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So please follow the above very good advice. You need to first make this code work without macros and without macro variables, and then you should be able to make your macro work properly.&lt;/P&gt;</description>
      <pubDate>Tue, 31 Oct 2023 21:49:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/macro-code-is-not-executing/m-p/900974#M40157</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-10-31T21:49:17Z</dc:date>
    </item>
    <item>
      <title>Re: macro code is not executing</title>
      <link>https://communities.sas.com/t5/New-SAS-User/macro-code-is-not-executing/m-p/901034#M40159</link>
      <description>&lt;P&gt;Thaks for help my bad I have fixed the issue&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;%macro carmake(Make= , Types=);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;data cars;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;set sashelp.cars;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;where Make in (&amp;amp;make)and Type in (&amp;amp;Types);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;%mend;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;%carmake(Make= "Acura" "Audi" "BMW" "Hyundai", Types= "SUV" "Sedan");&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Nov 2023 10:00:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/macro-code-is-not-executing/m-p/901034#M40159</guid>
      <dc:creator>animesh123</dc:creator>
      <dc:date>2023-11-01T10:00:44Z</dc:date>
    </item>
  </channel>
</rss>

