<?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 Control the number of decimal places in display in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Control-the-number-of-decimal-places-in-display/m-p/17695#M3392</link>
    <description>Is there any OPTIONS that can control the number of decimal places respectively for the two ways of outptut: 1) PUT, and 2) PROC PRINT? The variable invest has 6 decimal places currently by default.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
DATA newdata;&lt;BR /&gt;
    SET olddata;&lt;BR /&gt;
    IF idnum=10013 THEN PUT invest= ; &lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
PROC PRINT DATA=olddata;&lt;BR /&gt;
   WHERE idnum=10013;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
[/pre]</description>
    <pubDate>Mon, 20 Jun 2011 23:35:03 GMT</pubDate>
    <dc:creator>Kevin_Graduate</dc:creator>
    <dc:date>2011-06-20T23:35:03Z</dc:date>
    <item>
      <title>Control the number of decimal places in display</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Control-the-number-of-decimal-places-in-display/m-p/17695#M3392</link>
      <description>Is there any OPTIONS that can control the number of decimal places respectively for the two ways of outptut: 1) PUT, and 2) PROC PRINT? The variable invest has 6 decimal places currently by default.&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
DATA newdata;&lt;BR /&gt;
    SET olddata;&lt;BR /&gt;
    IF idnum=10013 THEN PUT invest= ; &lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
PROC PRINT DATA=olddata;&lt;BR /&gt;
   WHERE idnum=10013;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
[/pre]</description>
      <pubDate>Mon, 20 Jun 2011 23:35:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Control-the-number-of-decimal-places-in-display/m-p/17695#M3392</guid>
      <dc:creator>Kevin_Graduate</dc:creator>
      <dc:date>2011-06-20T23:35:03Z</dc:date>
    </item>
    <item>
      <title>Re: Control the number of decimal places in display</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Control-the-number-of-decimal-places-in-display/m-p/17696#M3393</link>
      <description>Hi:&lt;BR /&gt;
  The answer to your question will be a SAS format for both usage scenarios. The difference is that PROC PRINT will need a FORMAT statement:&lt;BR /&gt;
[pre]&lt;BR /&gt;
format invest comma10.2;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
       &lt;BR /&gt;
While the PUT statement just needs to be told what format to use:&lt;BR /&gt;
[pre]&lt;BR /&gt;
PUT invest= comma10.2;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
             &lt;BR /&gt;
 If you used a format statement inside your DATA step program, then WORK.NEWDATA would have the format permanently associated with the INVEST variable. For example, in the program below, the WEIGHT variable in WORK.NEW has the format COMMA10.6 associated with it. So, that format is used by PROC PRINT.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia&lt;BR /&gt;
[pre]&lt;BR /&gt;
data new;&lt;BR /&gt;
  set sashelp.class;&lt;BR /&gt;
  format weight comma10.6;&lt;BR /&gt;
run;&lt;BR /&gt;
          &lt;BR /&gt;
ods listing;&lt;BR /&gt;
proc print data=work.new;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Mon, 20 Jun 2011 23:55:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Control-the-number-of-decimal-places-in-display/m-p/17696#M3393</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-06-20T23:55:00Z</dc:date>
    </item>
    <item>
      <title>Re: Control the number of decimal places in display</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Control-the-number-of-decimal-places-in-display/m-p/17697#M3394</link>
      <description>thanks a lot, Cynthia@sas.</description>
      <pubDate>Tue, 21 Jun 2011 08:19:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Control-the-number-of-decimal-places-in-display/m-p/17697#M3394</guid>
      <dc:creator>Kevin_Graduate</dc:creator>
      <dc:date>2011-06-21T08:19:08Z</dc:date>
    </item>
  </channel>
</rss>

