<?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 case statement question in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-case-statement-question/m-p/149590#M11745</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case when strip(col1 ) then "DIGIT" &lt;/P&gt;&lt;P&gt;when anyalpha( strip(col1)) then "ALPHA" &lt;/P&gt;&lt;P&gt;else "DIGIT" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Under what condition will it evaluate to "DIGIT"? In case col1 = null?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 07 May 2014 19:20:13 GMT</pubDate>
    <dc:creator>eagles_dare13</dc:creator>
    <dc:date>2014-05-07T19:20:13Z</dc:date>
    <item>
      <title>SAS case statement question</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-case-statement-question/m-p/149590#M11745</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;case when strip(col1 ) then "DIGIT" &lt;/P&gt;&lt;P&gt;when anyalpha( strip(col1)) then "ALPHA" &lt;/P&gt;&lt;P&gt;else "DIGIT" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Under what condition will it evaluate to "DIGIT"? In case col1 = null?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 19:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-case-statement-question/m-p/149590#M11745</guid>
      <dc:creator>eagles_dare13</dc:creator>
      <dc:date>2014-05-07T19:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS case statement question</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-case-statement-question/m-p/149591#M11746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Without a case-operand, the when-expressions must resolve to logical values. Your first expression (strip(col1)) evaluates to a character value. It will be considered FALSE when the result is missing and TRUE otherwise. When it is FALSE then the second condition (anyalpha(strip(col1))) will also be false since strip(col1) is missing and the else-expression will be returned. So, I think that this expression will always evaluate to DIGIT. &lt;/P&gt;&lt;P&gt;What is your intent?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 07 May 2014 20:22:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/SAS-case-statement-question/m-p/149591#M11746</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2014-05-07T20:22:14Z</dc:date>
    </item>
  </channel>
</rss>

