<?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: Convert numeric with decimal to character with leading zeros in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Convert-numeric-with-decimal-to-character-with-leading-zeros/m-p/431432#M106724</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data w;
k=14.65;
k1=compress(put(k,z9.2),'.');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 26 Jan 2018 19:54:53 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2018-01-26T19:54:53Z</dc:date>
    <item>
      <title>Convert numeric with decimal to character with leading zeros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-numeric-with-decimal-to-character-with-leading-zeros/m-p/431428#M106723</link>
      <description>&lt;P&gt;I have HRLYEARN which is infiled as 6.2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So 14.65&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but I would like to convert it to an 8-character variable with no decimals ie: '001465'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Been trying for way too long at this point but&amp;nbsp;I can't get it to work.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2018 19:47:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-numeric-with-decimal-to-character-with-leading-zeros/m-p/431428#M106723</guid>
      <dc:creator>fieldsa83</dc:creator>
      <dc:date>2018-01-26T19:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: Convert numeric with decimal to character with leading zeros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-numeric-with-decimal-to-character-with-leading-zeros/m-p/431432#M106724</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data w;
k=14.65;
k1=compress(put(k,z9.2),'.');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Jan 2018 19:54:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-numeric-with-decimal-to-character-with-leading-zeros/m-p/431432#M106724</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-01-26T19:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Convert numeric with decimal to character with leading zeros</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Convert-numeric-with-decimal-to-character-with-leading-zeros/m-p/431433#M106725</link>
      <description>&lt;P&gt;Do you want to keep the same name? If so you need to rename the old variable.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want ;
  set have ;
     new =put(HRLYEARN*100,Z8.);
     rename new=HRLYEARN HRLYEARN=old_HRLYEARN ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Jan 2018 19:59:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Convert-numeric-with-decimal-to-character-with-leading-zeros/m-p/431433#M106725</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-01-26T19:59:49Z</dc:date>
    </item>
  </channel>
</rss>

