<?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: How to scan a where statment out from a macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-scan-a-where-statment-out-from-a-macro-variable/m-p/576827#M163338</link>
    <description>&lt;P&gt;Background: the macro language is a&amp;nbsp;&lt;EM&gt;text&lt;/EM&gt; processor and knows no other datatype, so quotes are not needed to identify strings. Instead they will become part of the "data".&lt;/P&gt;</description>
    <pubDate>Fri, 26 Jul 2019 08:03:31 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2019-07-26T08:03:31Z</dc:date>
    <item>
      <title>How to scan a where statment out from a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-scan-a-where-statment-out-from-a-macro-variable/m-p/576806#M163324</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I stored some where statements into a macro variable separated by '# ' and I'd like to scan the statement out one by one for deriving a new variable.&lt;BR /&gt;Below is a simple example but failed&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let whr=%str(TYPE eq 'A'#TYPE eq 'B'#TYPE eq 'C'#TYPE eq 'D');
%let x=%scan(&amp;amp;whr,1,'#');

%put &amp;amp;x;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;When I tried to %put &amp;amp;x, only 'TYPE eq' was displayed in log.&lt;BR /&gt;&lt;BR /&gt;Does anyone can give a hand? Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 06:04:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-scan-a-where-statment-out-from-a-macro-variable/m-p/576806#M163324</guid>
      <dc:creator>Coooooo_Lee</dc:creator>
      <dc:date>2019-07-26T06:04:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to scan a where statment out from a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-scan-a-where-statment-out-from-a-macro-variable/m-p/576807#M163325</link>
      <description>&lt;P&gt;You are telling SAS that the single quote is a separator, so SAS obeys.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This works:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let x=%scan(&amp;amp;whr,1,#);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 06:07:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-scan-a-where-statment-out-from-a-macro-variable/m-p/576807#M163325</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-07-26T06:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to scan a where statment out from a macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-scan-a-where-statment-out-from-a-macro-variable/m-p/576827#M163338</link>
      <description>&lt;P&gt;Background: the macro language is a&amp;nbsp;&lt;EM&gt;text&lt;/EM&gt; processor and knows no other datatype, so quotes are not needed to identify strings. Instead they will become part of the "data".&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jul 2019 08:03:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-scan-a-where-statment-out-from-a-macro-variable/m-p/576827#M163338</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2019-07-26T08:03:31Z</dc:date>
    </item>
  </channel>
</rss>

