<?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: best and best12. formats in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/best-and-best12-formats/m-p/850384#M336084</link>
    <description>&lt;P&gt;Do you really?&amp;nbsp; I get 18888.88:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;1    data _null_;
2       num = 18888.88;
3       int = 123456789012;
4       dat ='28aug17'd;
5       put num best12.;  /*      1888.88 */
6       put num best.  ;  /*      1888.88 */
7       put int best.  ;  /* 123456789012 */
8       put dat best.  ;  /*        21059 */
9    run;

    18888.88
    18888.88
123456789012
       21059
&lt;/PRE&gt;</description>
    <pubDate>Mon, 19 Dec 2022 20:41:56 GMT</pubDate>
    <dc:creator>Quentin</dc:creator>
    <dc:date>2022-12-19T20:41:56Z</dc:date>
    <item>
      <title>best and best12. formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/best-and-best12-formats/m-p/850382#M336083</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;I would like to ask why for&amp;nbsp;&lt;CODE class=" language-sas"&gt;18888.88 &amp;nbsp;I&amp;nbsp;get&amp;nbsp;1888.88&amp;nbsp;with&amp;nbsp;best.&amp;nbsp;and&amp;nbsp;best12.&amp;nbsp;formats?&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   num = 18888.88;
   int = 123456789012;
   dat ='28aug17'd;
   put num best12.;  /*      1888.88 */
   put num best.  ;  /*      1888.88 */
   put int best.  ;  /* 123456789012 */
   put dat best.  ;  /*        21059 */ 
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Dec 2022 20:35:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/best-and-best12-formats/m-p/850382#M336083</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2022-12-19T20:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: best and best12. formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/best-and-best12-formats/m-p/850384#M336084</link>
      <description>&lt;P&gt;Do you really?&amp;nbsp; I get 18888.88:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;1    data _null_;
2       num = 18888.88;
3       int = 123456789012;
4       dat ='28aug17'd;
5       put num best12.;  /*      1888.88 */
6       put num best.  ;  /*      1888.88 */
7       put int best.  ;  /* 123456789012 */
8       put dat best.  ;  /*        21059 */
9    run;

    18888.88
    18888.88
123456789012
       21059
&lt;/PRE&gt;</description>
      <pubDate>Mon, 19 Dec 2022 20:41:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/best-and-best12-formats/m-p/850384#M336084</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2022-12-19T20:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: best and best12. formats</title>
      <link>https://communities.sas.com/t5/SAS-Programming/best-and-best12-formats/m-p/850386#M336085</link>
      <description>&lt;P&gt;The BEST. format default width is 12, so these two PUT statements:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   num = 18888.88;
   put num best.;
   put num best12.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;will produce the same output:&lt;/P&gt;
&lt;PRE&gt;    18888.88
    18888.88
&lt;/PRE&gt;
&lt;P&gt;Note that the entire value is expressed as a total of 12 characters (4 leading spaces, a 1, four 8s, a ., and two more 8s. for a total of 12 characters). If you specified a width other than the default (12):&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
   num = 18888.88;
   put num best.; 
   put num best16.;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;the output would be different:&lt;/P&gt;
&lt;PRE&gt;    18888.88
        18888.88&lt;/PRE&gt;
&lt;P&gt;See how that second line now has 4 more leading spaces?&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;Mark&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Dec 2022 20:54:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/best-and-best12-formats/m-p/850386#M336085</guid>
      <dc:creator>SASJedi</dc:creator>
      <dc:date>2022-12-19T20:54:58Z</dc:date>
    </item>
  </channel>
</rss>

