<?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: Condition to change a case in sas guide in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Condition-to-change-a-case-in-sas-guide/m-p/289826#M19805</link>
    <description>&lt;P&gt;SUBSTR does not accept negative numbers. Also your attempted syntax would have meant "start at position 1 and go back 2"&lt;/P&gt;
&lt;P&gt;Here is an example of how to get the last 2 characters from a string using SUBSTR&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data example;
   x= 'Some string of texz';
   y= substr(x,length(x)-1,2);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This works by using the number of characters up to the last non-blank character. The LENGTH function would return the position of the Z in the example text. So we back up one position using -1 to get the position of the X. Then the 2 says to return 2 characters. This last may be needed if your string variable actually has trailing blanks though that isn't generally a concern if the only use is comparison as SAS will treat "33&amp;nbsp;&amp;nbsp; " as equal to "33".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 05 Aug 2016 15:38:14 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2016-08-05T15:38:14Z</dc:date>
    <item>
      <title>Condition to change a case in sas guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Condition-to-change-a-case-in-sas-guide/m-p/289551#M19764</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My table is composed of "Centre Financier", which identifies the city where&amp;nbsp;customers clients are traited.&lt;/P&gt;&lt;P&gt;On "date de bascule", il shows when the "Centre Financier" has changed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The "Centre Financier " changes to " CF après bascule" &amp;nbsp;when these conditions are combined :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the 3 last numbers of &amp;nbsp;"numero de compte " are equal to "Code CF"&lt;/P&gt;&lt;P&gt;AND&lt;/P&gt;&lt;P&gt;the 2 first numbers of BGP are equal to "BGP begin"&lt;/P&gt;&lt;P&gt;AND&amp;nbsp; "date derniere maj operation" &amp;gt;= "date de bascule"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can you help me we CASE / END solution please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 14:28:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Condition-to-change-a-case-in-sas-guide/m-p/289551#M19764</guid>
      <dc:creator>peter2</dc:creator>
      <dc:date>2016-08-04T14:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: Condition to change a case in sas guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Condition-to-change-a-case-in-sas-guide/m-p/289567#M19768</link>
      <description>&lt;P&gt;It helps if show a few records of input data and what the desired result looks like. Make sure the example shows at least one record for each type of issues. It helps if the example data is in the form of&amp;nbsp;datastep code to provide something we can test code with.&lt;/P&gt;</description>
      <pubDate>Thu, 04 Aug 2016 15:29:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Condition-to-change-a-case-in-sas-guide/m-p/289567#M19768</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-08-04T15:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Condition to change a case in sas guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Condition-to-change-a-case-in-sas-guide/m-p/289727#M19793</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw﻿&lt;/a&gt;, hello is it good what I join?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 06:36:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Condition-to-change-a-case-in-sas-guide/m-p/289727#M19793</guid>
      <dc:creator>peter2</dc:creator>
      <dc:date>2016-08-05T06:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: Condition to change a case in sas guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Condition-to-change-a-case-in-sas-guide/m-p/289730#M19796</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw﻿&lt;/a&gt;, I try to make a filter with SUBSTR on the last two caracters but it gives me nothing...is it the good code?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 06:43:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Condition-to-change-a-case-in-sas-guide/m-p/289730#M19796</guid>
      <dc:creator>peter2</dc:creator>
      <dc:date>2016-08-05T06:43:42Z</dc:date>
    </item>
    <item>
      <title>Re: Condition to change a case in sas guide</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Condition-to-change-a-case-in-sas-guide/m-p/289826#M19805</link>
      <description>&lt;P&gt;SUBSTR does not accept negative numbers. Also your attempted syntax would have meant "start at position 1 and go back 2"&lt;/P&gt;
&lt;P&gt;Here is an example of how to get the last 2 characters from a string using SUBSTR&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data example;
   x= 'Some string of texz';
   y= substr(x,length(x)-1,2);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This works by using the number of characters up to the last non-blank character. The LENGTH function would return the position of the Z in the example text. So we back up one position using -1 to get the position of the X. Then the 2 says to return 2 characters. This last may be needed if your string variable actually has trailing blanks though that isn't generally a concern if the only use is comparison as SAS will treat "33&amp;nbsp;&amp;nbsp; " as equal to "33".&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:38:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Condition-to-change-a-case-in-sas-guide/m-p/289826#M19805</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-08-05T15:38:14Z</dc:date>
    </item>
  </channel>
</rss>

