<?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 case when understanding in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/case-when-understanding/m-p/440432#M110010</link>
    <description>&lt;P&gt;Appreciate if some of&amp;nbsp;you help me understand the meaning of the following case when statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;case when upcase(DOMAIN)='NL' then '6131300'n 
     else '6231300'n 
end  as COMMISSION_AMT format=nlnum18.5&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 27 Feb 2018 20:50:04 GMT</pubDate>
    <dc:creator>Babloo</dc:creator>
    <dc:date>2018-02-27T20:50:04Z</dc:date>
    <item>
      <title>case when understanding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/case-when-understanding/m-p/440432#M110010</link>
      <description>&lt;P&gt;Appreciate if some of&amp;nbsp;you help me understand the meaning of the following case when statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;case when upcase(DOMAIN)='NL' then '6131300'n 
     else '6231300'n 
end  as COMMISSION_AMT format=nlnum18.5&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Feb 2018 20:50:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/case-when-understanding/m-p/440432#M110010</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-02-27T20:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: case when understanding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/case-when-understanding/m-p/440435#M110013</link>
      <description>&lt;P&gt;You are not stating what it is you don't understand, but my guess the&amp;nbsp;&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token string"&gt;'6131300'&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;n&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;stuff. It seem that you have source colunms with those names, hence the use of the n literal. Otherwise it would be interpreted as a string.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 10:24:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/case-when-understanding/m-p/440435#M110013</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2018-02-27T10:24:18Z</dc:date>
    </item>
    <item>
      <title>Re: case when understanding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/case-when-understanding/m-p/440438#M110016</link>
      <description>&lt;P&gt;yes, we've a source columns as follows. Could you please tell me what that case when statement will do?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;'6131300'n&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 27 Feb 2018 10:29:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/case-when-understanding/m-p/440438#M110016</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-02-27T10:29:02Z</dc:date>
    </item>
    <item>
      <title>Re: case when understanding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/case-when-understanding/m-p/440442#M110019</link>
      <description>&lt;P&gt;It either assigns the value of '6131300'n or '6231300'n (you should really get rid of such extremely stupid &lt;STRONG&gt;variable names&lt;/STRONG&gt; three days before yesterday) to the newly created variable, depending on the condition.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 10:34:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/case-when-understanding/m-p/440442#M110019</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-02-27T10:34:39Z</dc:date>
    </item>
    <item>
      <title>Re: case when understanding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/case-when-understanding/m-p/440451#M110026</link>
      <description>&lt;P&gt;The n after the string means the string is a named literal.&amp;nbsp; Named literals are used when dealing with poor data sources (such as Excell) where variable names are not compliant with SAS standards.&amp;nbsp; So in the case given variables cannot start with a number or special character, hence 6 is not a valid first character of a variable name.&amp;nbsp; To access these variables, the named literal is given and SAS internally converts this (or uses it) to access that data.&lt;/P&gt;
&lt;P&gt;Whilst this is available and can be used to bring data into the SAS system, once it is in the SAS system it is highly recommended to give them SAS conformant variable names to remove this need for named literals.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 11:04:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/case-when-understanding/m-p/440451#M110026</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2018-02-27T11:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: case when understanding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/case-when-understanding/m-p/440663#M110134</link>
      <description>&lt;P&gt;Create a variable named COMMISSION_AMT whose value depends on the value of DOMAIN.&amp;nbsp; When DOMAIN has the value 'NL' then use the value from the '6131300'n variable otherwise use the value from the '6231300'n variable.&amp;nbsp; Attach the display FORMAT of NLNUM18.5 to the new variable.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2018 20:53:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/case-when-understanding/m-p/440663#M110134</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-02-27T20:53:57Z</dc:date>
    </item>
  </channel>
</rss>

