<?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: Function to locate the last character in a string in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124323#M10223</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, but if you mean the script your posted above, it's obviously not going to work in the Advanced Expression area of SAS EG 4.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input Score;&lt;/P&gt;&lt;P&gt;if mod(score,10)=9 then score=score+1;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;119&lt;/P&gt;&lt;P&gt;110&lt;/P&gt;&lt;P&gt;100&lt;/P&gt;&lt;P&gt;114&lt;/P&gt;&lt;P&gt;120&lt;/P&gt;&lt;P&gt;115&lt;/P&gt;&lt;P&gt;106&lt;/P&gt;&lt;P&gt;109&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Jul 2013 04:03:37 GMT</pubDate>
    <dc:creator>pcfriendly</dc:creator>
    <dc:date>2013-07-02T04:03:37Z</dc:date>
    <item>
      <title>Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124314#M10214</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a number field &amp;amp; some values end in a '9' &amp;amp; I want to round those to the next number - that is '29' becomes '30'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know I could use a 'Round' type function but I'd like to know how I can firstly locate the last integer from a number value &amp;amp; if it is a '9' add 1 to it, otherwise leave the value as it is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In excel I would add this - =IF(RIGHT(E2,1)="9",E2+1,E2).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I looked at the RIGHT, SUBSTR &amp;amp; SUBSTRN functions but I suppose they are for text??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone suggest the best answer?&amp;nbsp; Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 01:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124314#M10214</guid>
      <dc:creator>pcfriendly</dc:creator>
      <dc:date>2013-07-02T01:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124315#M10215</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What does your data look like ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;data have;
input Score;
if mod(score,10)=9 then score=score+1;
cards;
119
110
100
114
120
115
106
109
;
run;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 02:17:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124315#M10215</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-07-02T02:17:47Z</dc:date>
    </item>
    <item>
      <title>Re: Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124316#M10216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ksharp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Field contains only Integers such as 0, 29, 30, 59, 150, 99 etc, so I want the ones that end in '0' to be left alone. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 03:12:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124316#M10216</guid>
      <dc:creator>pcfriendly</dc:creator>
      <dc:date>2013-07-02T03:12:13Z</dc:date>
    </item>
    <item>
      <title>Re: Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124317#M10217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;so what output do you want ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 03:18:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124317#M10217</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-07-02T03:18:39Z</dc:date>
    </item>
    <item>
      <title>Re: Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124318#M10218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As advised in the question;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I'd like to know how I can firstly locate the last integer from a number value &amp;amp; if it is a '9' add 1 to it, otherwise leave the value as it is. '29' becomes '30'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 03:30:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124318#M10218</guid>
      <dc:creator>pcfriendly</dc:creator>
      <dc:date>2013-07-02T03:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124319#M10219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tried Ksharp's answer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another option&lt;/P&gt;&lt;P&gt;Convert the number to a char and then use the similar logic from your excel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Barry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 03:50:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124319#M10219</guid>
      <dc:creator>twocanbazza</dc:creator>
      <dc:date>2013-07-02T03:50:04Z</dc:date>
    </item>
    <item>
      <title>Re: Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124320#M10220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is exactly what I am doing.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 03:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124320#M10220</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-07-02T03:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124321#M10221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Barry Stevens,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No I haven't tried KSharps answer as I need it as an advanced expression - such as the one I posted as what Excel would accept.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I should have explained that, so I'm looking for someting I can add into the Advanced Expression area of SAS EG 4.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I didn't mean to be rude KSharp, I also answer Forum questions &amp;amp; if someting is obvious, I reuse what I've already written.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think I did explain the bit about strings &amp;amp; numbers clearly enough, I don't know what function to use &amp;amp; these (String) ones didn't work, so I'm asking what function is best here.&lt;/P&gt;&lt;P&gt;Any suggests?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 03:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124321#M10221</guid>
      <dc:creator>pcfriendly</dc:creator>
      <dc:date>2013-07-02T03:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124322#M10222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 04:02:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124322#M10222</guid>
      <dc:creator>twocanbazza</dc:creator>
      <dc:date>2013-07-02T04:02:16Z</dc:date>
    </item>
    <item>
      <title>Re: Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124323#M10223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, but if you mean the script your posted above, it's obviously not going to work in the Advanced Expression area of SAS EG 4.3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input Score;&lt;/P&gt;&lt;P&gt;if mod(score,10)=9 then score=score+1;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;119&lt;/P&gt;&lt;P&gt;110&lt;/P&gt;&lt;P&gt;100&lt;/P&gt;&lt;P&gt;114&lt;/P&gt;&lt;P&gt;120&lt;/P&gt;&lt;P&gt;115&lt;/P&gt;&lt;P&gt;106&lt;/P&gt;&lt;P&gt;109&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="color: #ff0000; font-size: 12pt; font-family: Courier New;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 04:03:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124323#M10223</guid>
      <dc:creator>pcfriendly</dc:creator>
      <dc:date>2013-07-02T04:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124324#M10224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;score=ifn(mod(score,10)=9,score+1,score)&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 04:21:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124324#M10224</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2013-07-02T04:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124325#M10225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ksharp,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, this doesn't work. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to use it, I replaced the 'score' value with my field name &amp;amp; got the results of '0's &amp;amp; '1's instead of the field value + 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Existing values ending in '0' such as '40' were displayed as '1' &amp;amp; values ending in '9' such as '29' were displayed as '0' ??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 04:40:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124325#M10225</guid>
      <dc:creator>pcfriendly</dc:creator>
      <dc:date>2013-07-02T04:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124326#M10226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;In the query builder you can use expression like this to create a calculated column:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;case when substr(compress(put(num,15.)), length(compress(put(num,15.))),1)='9' then num+1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;else num&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12pt;"&gt;end&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am not sure if you are looking for the same or not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Saurabh&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/10736iA286D8260C8ED31B/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="Advanced Expression.jpg" title="Advanced Expression.jpg" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 13:55:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124326#M10226</guid>
      <dc:creator>pali</dc:creator>
      <dc:date>2013-07-02T13:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: Function to locate the last character in a string</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124327#M10227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think &lt;A __default_attr="645292" __jive_macro_name="user" class="jive_macro jive_macro_user" data-objecttype="3" href="https://communities.sas.com/"&gt;&lt;/A&gt; has it.&amp;nbsp; When adding your expression in the Query Builder, don't include the initial "score =".&amp;nbsp; Here's an example in the context of PROC SQL, which is how the Query Builder will use it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;input num;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;45&lt;/P&gt;&lt;P&gt;89&lt;/P&gt;&lt;P&gt;77&lt;/P&gt;&lt;P&gt;9&lt;/P&gt;&lt;P&gt;45&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;create table fix as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select num,&lt;/P&gt;&lt;P&gt;&amp;nbsp; /* BEGIN EXP */ &lt;STRONG&gt; ifn( mod(num,10) = 9,num+1,num)&lt;/STRONG&gt; /* END EXP */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; as want&lt;/P&gt;&lt;P&gt;&amp;nbsp; from test;&lt;/P&gt;&lt;P&gt;quit;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Jul 2013 14:14:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Function-to-locate-the-last-character-in-a-string/m-p/124327#M10227</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2013-07-02T14:14:16Z</dc:date>
    </item>
  </channel>
</rss>

