<?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 Rounding for decimals with + in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Rounding-for-decimals-with/m-p/170297#M1935</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a variable with data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;X= +0.0125&lt;/P&gt;&lt;P&gt;X= +7.90&lt;/P&gt;&lt;P&gt;X= - 0.0076&lt;/P&gt;&lt;P&gt;X= - 0.5&lt;/P&gt;&lt;P&gt;Can anyone help me get all these numbers with same decimal place while keeping the + and - sign in the begining of each number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you- sign in the begining&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 May 2014 01:50:35 GMT</pubDate>
    <dc:creator>mkop</dc:creator>
    <dc:date>2014-05-23T01:50:35Z</dc:date>
    <item>
      <title>Rounding for decimals with +</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Rounding-for-decimals-with/m-p/170297#M1935</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a variable with data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;X= +0.0125&lt;/P&gt;&lt;P&gt;X= +7.90&lt;/P&gt;&lt;P&gt;X= - 0.0076&lt;/P&gt;&lt;P&gt;X= - 0.5&lt;/P&gt;&lt;P&gt;Can anyone help me get all these numbers with same decimal place while keeping the + and - sign in the begining of each number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you- sign in the begining&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 01:50:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Rounding-for-decimals-with/m-p/170297#M1935</guid>
      <dc:creator>mkop</dc:creator>
      <dc:date>2014-05-23T01:50:35Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding for decimals with +</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Rounding-for-decimals-with/m-p/170298#M1936</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input x $;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;+0.0125&lt;/P&gt;&lt;P&gt;+7.90&lt;/P&gt;&lt;P&gt;-0.0076&lt;/P&gt;&lt;P&gt;-0.5&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 02:15:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Rounding-for-decimals-with/m-p/170298#M1936</guid>
      <dc:creator>stat_sas</dc:creator>
      <dc:date>2014-05-23T02:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding for decimals with +</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Rounding-for-decimals-with/m-p/170299#M1937</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How many decimal points do you want displayed? Do want trailing 0 to pad to that length?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming you want 4 decimals then a custom format such as this should work. Make sure the data is read as numeric not character.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format library=work;&lt;BR /&gt;picture MyDec&lt;BR /&gt;low -&amp;lt;0 = '0009.9999'(prefix='-')&lt;BR /&gt;0 - high=&amp;nbsp; '0009.9999'(prefix='+');&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;data have;&lt;BR /&gt;input x ;&lt;BR /&gt;datalines;&lt;BR /&gt;+0.0125&lt;BR /&gt;+7.90&lt;BR /&gt;-0.0076&lt;BR /&gt;-0.5&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;proc print data=have;&lt;BR /&gt;format x MyDec.;&lt;BR /&gt;var x;&lt;BR /&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 May 2014 14:32:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Rounding-for-decimals-with/m-p/170299#M1937</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-05-23T14:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Rounding for decimals with +</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Rounding-for-decimals-with/m-p/170300#M1938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A __default_attr="260198" __jive_macro_name="user" class="jive_macro jive_macro_user" href="https://communities.sas.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You've taken exactly the approach I was playing with as well when I run into some "picture" behaviour I didn't understand. &lt;A _jive_internal="true" class="active_link" href="https://communities.sas.com/thread/58118"&gt;https://communities.sas.com/thread/58118&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Suggest you add "round" to your format like data _null_ suggested in the link posted.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...and: I believe '0' should just be '0' and not +0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 May 2014 09:15:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Rounding-for-decimals-with/m-p/170300#M1938</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-05-24T09:15:27Z</dc:date>
    </item>
  </channel>
</rss>

