<?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: Regarding decimal points controlling while using put function in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Regarding-decimal-points-controlling-while-using-put-function/m-p/240522#M55616</link>
    <description>&lt;P&gt;As was noted, you don't have to convert them. &amp;nbsp;You could simply use a format when printing them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since your original question asked about converting them to character, you would use a PUT function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;newvar = put(oldvar, 8.3);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The width that you choose ("8" in this example) must be wide enough to include all characters that will be needed: &amp;nbsp;digits before the decimal point, digits after, the decimal point itself, and a negative sign if needed.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Dec 2015 19:01:28 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2015-12-22T19:01:28Z</dc:date>
    <item>
      <title>Regarding decimal points controlling while using put function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Regarding-decimal-points-controlling-while-using-put-function/m-p/240449#M55606</link>
      <description>&lt;P&gt;In numeric variable, I have numbers with 2 and 3 decimal points. what format can I use to convert them to the character format with same decimal points.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 14:55:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Regarding-decimal-points-controlling-while-using-put-function/m-p/240449#M55606</guid>
      <dc:creator>smitalpatel</dc:creator>
      <dc:date>2015-12-22T14:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding decimal points controlling while using put function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Regarding-decimal-points-controlling-while-using-put-function/m-p/240454#M55607</link>
      <description>&lt;P&gt;Well, if the numbers are all in one column then you likely have a general format such as best. applied to it. &amp;nbsp;Set the format explicity that you want:&lt;/P&gt;
&lt;P&gt;format &amp;lt;your_variable&amp;gt; 5.3;&lt;/P&gt;
&lt;P&gt;This will give the number 5 elements including dot e.g.&lt;BR /&gt;42.32&lt;/P&gt;
&lt;P&gt;However to &amp;nbsp;extra zeroes to pad out you use the z format:&lt;/P&gt;
&lt;P&gt;format &amp;lt;your_variable&amp;gt; z7.4;&lt;/P&gt;
&lt;P&gt;So 42.3 would become:&lt;/P&gt;
&lt;P&gt;42.3000&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 15:05:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Regarding-decimal-points-controlling-while-using-put-function/m-p/240454#M55607</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-12-22T15:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: Regarding decimal points controlling while using put function</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Regarding-decimal-points-controlling-while-using-put-function/m-p/240522#M55616</link>
      <description>&lt;P&gt;As was noted, you don't have to convert them. &amp;nbsp;You could simply use a format when printing them.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since your original question asked about converting them to character, you would use a PUT function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;newvar = put(oldvar, 8.3);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The width that you choose ("8" in this example) must be wide enough to include all characters that will be needed: &amp;nbsp;digits before the decimal point, digits after, the decimal point itself, and a negative sign if needed.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Dec 2015 19:01:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Regarding-decimal-points-controlling-while-using-put-function/m-p/240522#M55616</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2015-12-22T19:01:28Z</dc:date>
    </item>
  </channel>
</rss>

