<?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: format max dec when creating new variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/format-max-dec-when-creating-new-variable/m-p/412455#M100881</link>
    <description>&lt;P&gt;MAXDEC is only an option in PROC MEANS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You use a FORMAT or ROUND in a data step or SQL to limit the decimal places.&lt;/P&gt;</description>
    <pubDate>Fri, 10 Nov 2017 18:32:40 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-11-10T18:32:40Z</dc:date>
    <item>
      <title>format max dec when creating new variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-max-dec-when-creating-new-variable/m-p/412448#M100880</link>
      <description>&lt;P&gt;Hi all!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If I write this to calculate a percentage in a data step,&amp;nbsp; where do I write the maxdec=2&amp;nbsp; so that percent_miss is only 2 decimals?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data gaq_4 (drop=_TYPE_ _FREQ_);&lt;BR /&gt;set gaq_1 (rename=(_FREQ_=Study_Population));&lt;BR /&gt;Percent_Miss=nmiss/Study_Population;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 18:15:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-max-dec-when-creating-new-variable/m-p/412448#M100880</guid>
      <dc:creator>jenim514</dc:creator>
      <dc:date>2017-11-10T18:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: format max dec when creating new variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-max-dec-when-creating-new-variable/m-p/412455#M100881</link>
      <description>&lt;P&gt;MAXDEC is only an option in PROC MEANS.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You use a FORMAT or ROUND in a data step or SQL to limit the decimal places.&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2017 18:32:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-max-dec-when-creating-new-variable/m-p/412455#M100881</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-11-10T18:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: format max dec when creating new variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/format-max-dec-when-creating-new-variable/m-p/412473#M100882</link>
      <description>&lt;P&gt;Are you asking how to round your results to 2 decimal places?&lt;/P&gt;
&lt;P&gt;Use the ROUND() function.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Percent_Miss=round(nmiss/Study_Population, 0.01);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 10 Nov 2017 18:54:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/format-max-dec-when-creating-new-variable/m-p/412473#M100882</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-11-10T18:54:09Z</dc:date>
    </item>
  </channel>
</rss>

