<?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: Stuck on syntax in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Stuck-on-syntax/m-p/293227#M60969</link>
    <description>&lt;P&gt;I think you need to have quotes around the # in the scan.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried:&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token macroname"&gt;when (%scan&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;rule_list&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,"&lt;/SPAN&gt;#"&lt;SPAN class="token punctuation"&gt;))&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 22 Aug 2016 19:11:05 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-08-22T19:11:05Z</dc:date>
    <item>
      <title>Stuck on syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Stuck-on-syntax/m-p/293162#M60942</link>
      <description>&lt;P&gt;I have the following Case statements:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;					CASE 
						WHEN %scan(&amp;amp;rule_list, 1,#) AND a.RULEFLAG = "-" THEN "&amp;amp;RULE_ORDER"
						WHEN %scan(&amp;amp;rule_list, 2,#) AND a.RULEFLAG = "-" THEN "&amp;amp;RULE_ORDER"
					END as RuleFlag&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The resolution of %scan(&amp;amp;rule_list,1,#) may look like this: &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A.ACTUAL_DLVRY_DATE IS NULL AND B.ACTUAL_DLVRY_DATE IS NOT NULL&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My problem is that I need it to resolve with &lt;SPAN&gt;parentheses &lt;/SPAN&gt;around the value. &amp;nbsp;Like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(A.ACTUAL_DLVRY_DATE IS NULL AND B.ACTUAL_DLVRY_DATE IS NOT NULL)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 15:21:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Stuck-on-syntax/m-p/293162#M60942</guid>
      <dc:creator>buechler66</dc:creator>
      <dc:date>2016-08-22T15:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: Stuck on syntax</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Stuck-on-syntax/m-p/293227#M60969</link>
      <description>&lt;P&gt;I think you need to have quotes around the # in the scan.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have you tried:&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token macroname"&gt;when (%scan&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;&amp;amp;&lt;/SPAN&gt;rule_list&lt;SPAN class="token punctuation"&gt;,&lt;/SPAN&gt; &lt;SPAN class="token number"&gt;1&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;,"&lt;/SPAN&gt;#"&lt;SPAN class="token punctuation"&gt;))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 19:11:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Stuck-on-syntax/m-p/293227#M60969</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-08-22T19:11:05Z</dc:date>
    </item>
  </channel>
</rss>

