<?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: delete the last digit in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/delete-the-last-digit/m-p/666898#M22993</link>
    <description>It is a character, the "number" if its ends with "4" I want to delete the whole row. thanks</description>
    <pubDate>Fri, 03 Jul 2020 21:08:48 GMT</pubDate>
    <dc:creator>Smitha9</dc:creator>
    <dc:date>2020-07-03T21:08:48Z</dc:date>
    <item>
      <title>delete the last digit</title>
      <link>https://communities.sas.com/t5/New-SAS-User/delete-the-last-digit/m-p/666888#M22990</link>
      <description>&lt;P&gt;I have a data.&lt;/P&gt;&lt;P&gt;ID&amp;nbsp; &amp;nbsp;number&lt;/P&gt;&lt;P&gt;1&amp;nbsp; &amp;nbsp; 10022&lt;/P&gt;&lt;P&gt;2&amp;nbsp; &amp;nbsp; 12332&lt;/P&gt;&lt;P&gt;3&amp;nbsp; &amp;nbsp; 12334&lt;/P&gt;&lt;P&gt;4&amp;nbsp; &amp;nbsp; 13452&lt;/P&gt;&lt;P&gt;5&amp;nbsp; &amp;nbsp; 13454&lt;/P&gt;&lt;P&gt;I want to delete the ID which has "number" with last digit which has "4"&lt;/P&gt;&lt;P&gt;I want,&lt;/P&gt;&lt;P&gt;1&amp;nbsp; 10022&lt;/P&gt;&lt;P&gt;2 12332&lt;/P&gt;&lt;P&gt;3 13452&lt;/P&gt;&lt;P&gt;thank you&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 20:54:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/delete-the-last-digit/m-p/666888#M22990</guid>
      <dc:creator>Smitha9</dc:creator>
      <dc:date>2020-07-03T20:54:17Z</dc:date>
    </item>
    <item>
      <title>Re: delete the last digit</title>
      <link>https://communities.sas.com/t5/New-SAS-User/delete-the-last-digit/m-p/666892#M22991</link>
      <description>Is it a numeric or character variable?&lt;BR /&gt;Assuming character...but if it's numeric use SUBSTRN instead of SUBSTR.&lt;BR /&gt;&lt;BR /&gt;where substr(number, length(number)-1) ne '4'</description>
      <pubDate>Fri, 03 Jul 2020 21:03:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/delete-the-last-digit/m-p/666892#M22991</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-07-03T21:03:35Z</dc:date>
    </item>
    <item>
      <title>Re: delete the last digit</title>
      <link>https://communities.sas.com/t5/New-SAS-User/delete-the-last-digit/m-p/666894#M22992</link>
      <description>&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;if substr(put(number,z5.),5,1) = '4' then delete;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 21:05:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/delete-the-last-digit/m-p/666894#M22992</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2020-07-03T21:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: delete the last digit</title>
      <link>https://communities.sas.com/t5/New-SAS-User/delete-the-last-digit/m-p/666898#M22993</link>
      <description>It is a character, the "number" if its ends with "4" I want to delete the whole row. thanks</description>
      <pubDate>Fri, 03 Jul 2020 21:08:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/delete-the-last-digit/m-p/666898#M22993</guid>
      <dc:creator>Smitha9</dc:creator>
      <dc:date>2020-07-03T21:08:48Z</dc:date>
    </item>
    <item>
      <title>Re: delete the last digit</title>
      <link>https://communities.sas.com/t5/New-SAS-User/delete-the-last-digit/m-p/666901#M22994</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/329198"&gt;@Smitha9&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;It is a character, the "number" if its ends with "4" I want to delete the whole row. thanks&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if char(number,length(number))='4' then delete;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 03 Jul 2020 21:16:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/delete-the-last-digit/m-p/666901#M22994</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-07-03T21:16:15Z</dc:date>
    </item>
    <item>
      <title>Re: delete the last digit</title>
      <link>https://communities.sas.com/t5/New-SAS-User/delete-the-last-digit/m-p/666928#M22995</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/329198"&gt;@Smitha9&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is another approach using pearl regular expressions:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
	set have;
	if prxmatch('/4\s*$/',number) then delete;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The PRXMATCH() function looks for the pattern &lt;FONT color="#FF00FF"&gt;4&lt;/FONT&gt; followed by 0, 1 or more blanks (&lt;FONT color="#FF00FF"&gt;\s*&lt;/FONT&gt;) at the end of the string (&lt;FONT color="#FF00FF"&gt;$&lt;/FONT&gt;) in the variable 'number'.&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jul 2020 08:10:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/delete-the-last-digit/m-p/666928#M22995</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-07-04T08:10:11Z</dc:date>
    </item>
  </channel>
</rss>

