<?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 ISSUE in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-macro-ISSUE/m-p/716870#M221636</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've a macro variable containing the subject value like %let subject='10660','106661','106663','10664','10665','16666','10667','10668','106669','10670','10671','10672','10667','106674','106675','106676','106677','10679','106681','10682','106684','10685','10686','10687','16688','106689','106690','106692','305771','99999'; and it contains approx 3000 subject.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i'm trying to get only 3000 subject data based on below code . but i'm not able to identify why it's not working . Please share your valuable comment.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA QS_2;
SET QS_1;
WHERE SUBJECT IN ("&amp;amp;SUBJECT");
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you in advance !!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 04 Feb 2021 18:48:11 GMT</pubDate>
    <dc:creator>singhsahab</dc:creator>
    <dc:date>2021-02-04T18:48:11Z</dc:date>
    <item>
      <title>sas macro ISSUE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macro-ISSUE/m-p/716870#M221636</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've a macro variable containing the subject value like %let subject='10660','106661','106663','10664','10665','16666','10667','10668','106669','10670','10671','10672','10667','106674','106675','106676','106677','10679','106681','10682','106684','10685','10686','10687','16688','106689','106690','106692','305771','99999'; and it contains approx 3000 subject.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i'm trying to get only 3000 subject data based on below code . but i'm not able to identify why it's not working . Please share your valuable comment.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA QS_2;
SET QS_1;
WHERE SUBJECT IN ("&amp;amp;SUBJECT");
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Thank you in advance !!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 18:48:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macro-ISSUE/m-p/716870#M221636</guid>
      <dc:creator>singhsahab</dc:creator>
      <dc:date>2021-02-04T18:48:11Z</dc:date>
    </item>
    <item>
      <title>Re: sas macro ISSUE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macro-ISSUE/m-p/716873#M221637</link>
      <description>&lt;P&gt;Simply loose the double quotes. Like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let names = 'Alfred', 'Alice';

data want;
   set sashelp.class;
   where name in (&amp;amp;names.);
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 04 Feb 2021 18:51:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macro-ISSUE/m-p/716873#M221637</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2021-02-04T18:51:02Z</dc:date>
    </item>
    <item>
      <title>Re: sas macro ISSUE</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-macro-ISSUE/m-p/716884#M221639</link>
      <description>&lt;P&gt;When you used&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;WHERE SUBJECT IN ("&amp;amp;SUBJECT");&lt;/LI-CODE&gt;
&lt;P&gt;you created code that looks like this (short enough to see clearly)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;where = subject in (" '10660','106661','106663' ");&lt;/PRE&gt;
&lt;P&gt;So the outer double quotes make the whole value inside them as a single string, not 3000 separate strings (or three in my reduced example).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Feb 2021 19:08:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-macro-ISSUE/m-p/716884#M221639</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-02-04T19:08:38Z</dc:date>
    </item>
  </channel>
</rss>

