<?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 remove the first leading zero from charc variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/remove-the-first-leading-zero-from-charc-variable/m-p/284110#M57955</link>
    <description>&lt;P&gt;I need to remove the first zero, some obs have values like 00234, 00a234, and i only need to remove the first zero&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can anybody advice how to get rid of the first "o" but not all leading zeros? Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;v2= substr(v1,verify(v1,'0'));&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 13 Jul 2016 16:22:08 GMT</pubDate>
    <dc:creator>Bal23</dc:creator>
    <dc:date>2016-07-13T16:22:08Z</dc:date>
    <item>
      <title>remove the first leading zero from charc variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-the-first-leading-zero-from-charc-variable/m-p/284110#M57955</link>
      <description>&lt;P&gt;I need to remove the first zero, some obs have values like 00234, 00a234, and i only need to remove the first zero&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;can anybody advice how to get rid of the first "o" but not all leading zeros? Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;v2= substr(v1,verify(v1,'0'));&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jul 2016 16:22:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-the-first-leading-zero-from-charc-variable/m-p/284110#M57955</guid>
      <dc:creator>Bal23</dc:creator>
      <dc:date>2016-07-13T16:22:08Z</dc:date>
    </item>
    <item>
      <title>Re: remove the first leading zero from charc variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/remove-the-first-leading-zero-from-charc-variable/m-p/284112#M57957</link>
      <description>&lt;P&gt;You don't say if you want to remove 0 if there is only one leading zero. If that is the case then one way is&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if index(v1,'0')=1 then v2= substr(v1,2);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if ony replace the first zero when you have 2 leading zeroes&amp;nbsp;or more then&lt;/P&gt;
&lt;P&gt;if index(v1,'00')=1 then v2= substr(v1,2);&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jul 2016 16:29:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/remove-the-first-leading-zero-from-charc-variable/m-p/284112#M57957</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-07-13T16:29:42Z</dc:date>
    </item>
  </channel>
</rss>

