<?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: Formating number 0.000 with SAS in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/Formating-number-0-000-with-SAS/m-p/195121#M4187</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume you wanted to apply the format to limit the display of non-significant precision in the numbers.&amp;nbsp; You would probably have the best results by rounding the values to 4 decimal places and then letting SAS format the values using BEST format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; mydata ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; f field1-field8 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;over&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; f; f=round(f,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;0.0001&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;file&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'myfile.csv'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; dsd ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; field1-field8 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;_all_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;) (:) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Aug 2015 14:17:48 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2015-08-09T14:17:48Z</dc:date>
    <item>
      <title>Formating number 0.000 with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Formating-number-0-000-with-SAS/m-p/195117#M4183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;i`m currently producing a csv txt file with around 500.000 lines using SAS on mainframe (zos).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It has around 40 columns and its majority are numeric. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At certain point of my program i use the following to format the numbers : &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FORMAT field1 field2 field3 field4 field5 field6&amp;nbsp; 8.4;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My goal is to reduce the file output report size and since a lot of data is 0.0000 i thought i could replace this by 0 only.&lt;/P&gt;&lt;P&gt;This would save 5 characters and certainly would save some space.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideia on how could i do this ?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 08 Aug 2015 19:54:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Formating-number-0-000-with-SAS/m-p/195117#M4183</guid>
      <dc:creator>MainframeSAS</dc:creator>
      <dc:date>2015-08-08T19:54:04Z</dc:date>
    </item>
    <item>
      <title>Re: Formating number 0.000 with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Formating-number-0-000-with-SAS/m-p/195118#M4184</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The BEST format could do what you want. Try BEST8. - this will ensure 0 just shows as 0 and decimals like 12.34 will show as 12.34.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Aug 2015 01:41:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Formating-number-0-000-with-SAS/m-p/195118#M4184</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2015-08-09T01:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: Formating number 0.000 with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Formating-number-0-000-with-SAS/m-p/195119#M4185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe picture format will work, please replace 8.4 with picture the below picture format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc format fmtlib;&lt;/P&gt;&lt;P&gt;picture pct 0='9'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;lt;-high='09.9999';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; run;&lt;/P&gt;&lt;P&gt;&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;cards;&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;8.99&lt;/P&gt;&lt;P&gt;8.12&lt;/P&gt;&lt;P&gt;8.3&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;format x pct.;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jag&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Aug 2015 02:00:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Formating-number-0-000-with-SAS/m-p/195119#M4185</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2015-08-09T02:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: Formating number 0.000 with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Formating-number-0-000-with-SAS/m-p/195120#M4186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Back in the day we used implied decimal in-formatting.&amp;nbsp; How much space would getting rid of ALL the decimal points save?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How much more space would you save if you got rid of the field delimiters?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Aug 2015 11:54:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Formating-number-0-000-with-SAS/m-p/195120#M4186</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2015-08-09T11:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Formating number 0.000 with SAS</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/Formating-number-0-000-with-SAS/m-p/195121#M4187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I assume you wanted to apply the format to limit the display of non-significant precision in the numbers.&amp;nbsp; You would probably have the best results by rounding the values to 4 decimal places and then letting SAS format the values using BEST format.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;_null_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; mydata ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;array&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; f field1-field8 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;do&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;over&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; f; f=round(f,&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;0.0001&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;); &lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;file&lt;/SPAN&gt; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'myfile.csv'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; dsd ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; field1-field8 ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;put&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;_all_&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;) (:) ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Aug 2015 14:17:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/Formating-number-0-000-with-SAS/m-p/195121#M4187</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2015-08-09T14:17:48Z</dc:date>
    </item>
  </channel>
</rss>

