<?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: Substring and replace in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Substring-and-replace/m-p/123921#M25396</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;substr(yourvar,4,1) = put(rank(substr(yourvar,4,1))-64,1.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assuming it's always uppercase and you are on a standard ASCII system (not EBCDIC).&amp;nbsp; 'A'=65 through 'Z'=90.&amp;nbsp; Of course if you go past I ('9' in this) you will have a problem of space (what happens to the second digit). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Oct 2013 16:18:00 GMT</pubDate>
    <dc:creator>snoopy369</dc:creator>
    <dc:date>2013-10-25T16:18:00Z</dc:date>
    <item>
      <title>Substring and replace</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substring-and-replace/m-p/123920#M25395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was recently given some numeric data the ends in a character. The last characce ter corresponds to a numeric variable. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ex.&lt;/P&gt;&lt;P&gt;000A = 0001&lt;/P&gt;&lt;P&gt;000B = 0002 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Right now I'm using the Substr() function to get the last character of every variable, then I replace it and join the new converted number back on. I was wondering if you all knew a more efficient method. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 16:06:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substring-and-replace/m-p/123920#M25395</guid>
      <dc:creator>Jsendzik</dc:creator>
      <dc:date>2013-10-25T16:06:06Z</dc:date>
    </item>
    <item>
      <title>Re: Substring and replace</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substring-and-replace/m-p/123921#M25396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;substr(yourvar,4,1) = put(rank(substr(yourvar,4,1))-64,1.);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;assuming it's always uppercase and you are on a standard ASCII system (not EBCDIC).&amp;nbsp; 'A'=65 through 'Z'=90.&amp;nbsp; Of course if you go past I ('9' in this) you will have a problem of space (what happens to the second digit). &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 16:18:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substring-and-replace/m-p/123921#M25396</guid>
      <dc:creator>snoopy369</dc:creator>
      <dc:date>2013-10-25T16:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Substring and replace</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Substring-and-replace/m-p/123922#M25397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Looks like 'zoned decimal' for which SAS has an informat.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Oct 2013 19:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Substring-and-replace/m-p/123922#M25397</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2013-10-25T19:57:46Z</dc:date>
    </item>
  </channel>
</rss>

