<?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: %scan not working in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/scan-not-working/m-p/587795#M167904</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let name=ABCD efgh,ijkl mnop,qrst;

%put %scan(%bquote(&amp;amp;name),1,%(,));&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 11 Sep 2019 11:33:18 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2019-09-11T11:33:18Z</dc:date>
    <item>
      <title>%scan not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-not-working/m-p/587720#M167881</link>
      <description>%let name=ABCD efgh,ijkl mnop,qrst;&lt;BR /&gt;&lt;BR /&gt;%put. %scan(&amp;amp;name,1, ,);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;How to derive first delimiter string see below..&lt;BR /&gt;&lt;BR /&gt;ABCD efgh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Sep 2019 05:13:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-not-working/m-p/587720#M167881</guid>
      <dc:creator>thanikondharish</dc:creator>
      <dc:date>2019-09-11T05:13:57Z</dc:date>
    </item>
    <item>
      <title>Re: %scan not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-not-working/m-p/587721#M167882</link>
      <description>&lt;P&gt;%let name=ABCD efgh,ijkl mnop,qrst;&lt;BR /&gt;%put %scan(%nrbquote(&amp;amp;name),1,%nrbquote(,));&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 05:36:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-not-working/m-p/587721#M167882</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-09-11T05:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: %scan not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-not-working/m-p/587795#M167904</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%let name=ABCD efgh,ijkl mnop,qrst;

%put %scan(%bquote(&amp;amp;name),1,%(,));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 11 Sep 2019 11:33:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-not-working/m-p/587795#M167904</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-09-11T11:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: %scan not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-not-working/m-p/587833#M167914</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/18408"&gt;@Ksharp&lt;/a&gt;&amp;nbsp;I think you're missing the STR.&amp;nbsp; As written:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%scan(%bquote(&amp;amp;name),1,%(,));&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;would treat four characters as delimiters: % ( )&amp;nbsp; ,&lt;/P&gt;
&lt;P&gt;It works because the () are enough to hide the comma from the macro processor during the macro call.&amp;nbsp; But if the string has % or () in it, those characters will be delimiters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;1 %let name=ABCD% ef(gh,ijkl m)nop,qrst;&lt;BR /&gt;2 %put %scan(%bquote(&amp;amp;name),1,%(,));&lt;BR /&gt;ABCD&lt;/PRE&gt;
&lt;P&gt;But with %STR(), it treats only one character as a delimiter: ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;3 %put %scan(%bquote(&amp;amp;name),1,%str(,));&lt;BR /&gt;ABCD% ef(gh&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Sep 2019 13:05:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-not-working/m-p/587833#M167914</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2019-09-11T13:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: %scan not working</title>
      <link>https://communities.sas.com/t5/SAS-Programming/scan-not-working/m-p/588163#M168062</link>
      <description>&lt;P&gt;Yeah. I am sure I write %STR ,&lt;/P&gt;
&lt;PRE&gt;%put %scan(%bquote(&amp;amp;name),1,%str(,));&lt;/PRE&gt;
&lt;P&gt;But I don't know why it would appear this. Maybe this forum eat 'STR' .&lt;/P&gt;</description>
      <pubDate>Thu, 12 Sep 2019 10:52:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/scan-not-working/m-p/588163#M168062</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2019-09-12T10:52:36Z</dc:date>
    </item>
  </channel>
</rss>

