<?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 Leading 0 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Leading-0/m-p/98421#M20784</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a column that has values mix of Alphabets and numbers. I need to append a leading 0 if there only a single digit as shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ColumA&lt;/P&gt;&lt;P&gt;MV&lt;/P&gt;&lt;P&gt;ZX&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;12&lt;/P&gt;&lt;P&gt;The above should be:&lt;/P&gt;&lt;P&gt;ColumA&lt;/P&gt;&lt;P&gt;MV&lt;/P&gt;&lt;P&gt;ZX&lt;/P&gt;&lt;P&gt;05&lt;/P&gt;&lt;P&gt;12&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Sep 2013 14:31:27 GMT</pubDate>
    <dc:creator>SASPhile</dc:creator>
    <dc:date>2013-09-30T14:31:27Z</dc:date>
    <item>
      <title>Leading 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Leading-0/m-p/98421#M20784</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a column that has values mix of Alphabets and numbers. I need to append a leading 0 if there only a single digit as shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ColumA&lt;/P&gt;&lt;P&gt;MV&lt;/P&gt;&lt;P&gt;ZX&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;12&lt;/P&gt;&lt;P&gt;The above should be:&lt;/P&gt;&lt;P&gt;ColumA&lt;/P&gt;&lt;P&gt;MV&lt;/P&gt;&lt;P&gt;ZX&lt;/P&gt;&lt;P&gt;05&lt;/P&gt;&lt;P&gt;12&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 14:31:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Leading-0/m-p/98421#M20784</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2013-09-30T14:31:27Z</dc:date>
    </item>
    <item>
      <title>Re: Leading 0</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Leading-0/m-p/98422#M20785</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This works for your presented data. If you have more complex scenario, please exhaust them in your post.&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input ColumA$2.;&lt;/P&gt;&lt;P&gt;if length(ColumA)=1 and anydigit(ColumA)&amp;gt;0 then ColumA=cats('0',ColumA); &lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;MV&lt;/P&gt;&lt;P&gt;ZX&lt;/P&gt;&lt;P&gt;5&lt;/P&gt;&lt;P&gt;12&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Haikuo &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 15:07:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Leading-0/m-p/98422#M20785</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2013-09-30T15:07:18Z</dc:date>
    </item>
  </channel>
</rss>

