<?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 BEST-format, with comma as decimal point in Microsoft Integration with SAS</title>
    <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/BEST-format-with-comma-as-decimal-point/m-p/5123#M201</link>
    <description>Hi&lt;BR /&gt;
&lt;BR /&gt;
I use commas as standard decimal point. It's important when you work with export to excel (swedish version) from WRS. I want to use a format like Best-format, where I exchange dot with comma. I could use the NUMX-format, but then I'll get decimals even for the integer (which stands for 90 % of the values). I want to suppress the decimals when it is a integer, just like the best-format. How do I solve that, without creating a char?&lt;BR /&gt;
&lt;BR /&gt;
Code:&lt;BR /&gt;
data test;&lt;BR /&gt;
  x = 4.5;&lt;BR /&gt;
  y = 4.5;&lt;BR /&gt;
  z = 4.5;&lt;BR /&gt;
  output;&lt;BR /&gt;
  x = 4;&lt;BR /&gt;
  y = 4;&lt;BR /&gt;
  z = 4;&lt;BR /&gt;
  output;&lt;BR /&gt;
  format x best. y numx. z numx6.1;&lt;BR /&gt;
run;&lt;BR /&gt;
proc print;run;&lt;BR /&gt;
&lt;BR /&gt;
Result:&lt;BR /&gt;
x       y         z      &lt;B&gt;Expected&lt;/B&gt;&lt;BR /&gt;
4.5    5        4,5     &lt;B&gt;4,5&lt;/B&gt;&lt;BR /&gt;
4       4        4,0     &lt;B&gt;4&lt;/B&gt;

Message was edited by: RoseBowl</description>
    <pubDate>Thu, 18 Oct 2007 08:15:40 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-10-18T08:15:40Z</dc:date>
    <item>
      <title>BEST-format, with comma as decimal point</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/BEST-format-with-comma-as-decimal-point/m-p/5123#M201</link>
      <description>Hi&lt;BR /&gt;
&lt;BR /&gt;
I use commas as standard decimal point. It's important when you work with export to excel (swedish version) from WRS. I want to use a format like Best-format, where I exchange dot with comma. I could use the NUMX-format, but then I'll get decimals even for the integer (which stands for 90 % of the values). I want to suppress the decimals when it is a integer, just like the best-format. How do I solve that, without creating a char?&lt;BR /&gt;
&lt;BR /&gt;
Code:&lt;BR /&gt;
data test;&lt;BR /&gt;
  x = 4.5;&lt;BR /&gt;
  y = 4.5;&lt;BR /&gt;
  z = 4.5;&lt;BR /&gt;
  output;&lt;BR /&gt;
  x = 4;&lt;BR /&gt;
  y = 4;&lt;BR /&gt;
  z = 4;&lt;BR /&gt;
  output;&lt;BR /&gt;
  format x best. y numx. z numx6.1;&lt;BR /&gt;
run;&lt;BR /&gt;
proc print;run;&lt;BR /&gt;
&lt;BR /&gt;
Result:&lt;BR /&gt;
x       y         z      &lt;B&gt;Expected&lt;/B&gt;&lt;BR /&gt;
4.5    5        4,5     &lt;B&gt;4,5&lt;/B&gt;&lt;BR /&gt;
4       4        4,0     &lt;B&gt;4&lt;/B&gt;

Message was edited by: RoseBowl</description>
      <pubDate>Thu, 18 Oct 2007 08:15:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/BEST-format-with-comma-as-decimal-point/m-p/5123#M201</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-10-18T08:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: BEST-format, with comma as decimal point</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/BEST-format-with-comma-as-decimal-point/m-p/5124#M202</link>
      <description>Hi:&lt;BR /&gt;
  You have to compare apples to apples. NUMX format is closer to the w.d format -- NOT the BEST. format. It says in the doc (about NUMX) that:&lt;B&gt;&lt;BR /&gt;
The NUMXw.d format is similar to the w.d format except that NUMXw.d writes numeric values with a comma in place of the decimal point.&lt;/B&gt; &lt;BR /&gt;
&lt;BR /&gt;
and then, if you look at the doc for the w.d format: &lt;B&gt;&lt;BR /&gt;
The w.d format rounds to the nearest number that fits in the output field. ... If d is 0 or you omit d, w.d writes the value without a decimal point.&lt;BR /&gt;
&lt;/B&gt;&lt;BR /&gt;
&lt;BR /&gt;
It seems to me that everything is working as designed. So this modification of your program:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data test;&lt;BR /&gt;
  x = 4.5;&lt;BR /&gt;
  xx = 4.5;&lt;BR /&gt;
  y = 4.5;&lt;BR /&gt;
  z = 4.5;&lt;BR /&gt;
  output;&lt;BR /&gt;
  &lt;BR /&gt;
  x = 4;&lt;BR /&gt;
  xx = 4;&lt;BR /&gt;
  y = 4;&lt;BR /&gt;
  z = 4;&lt;BR /&gt;
  output;&lt;BR /&gt;
    &lt;BR /&gt;
format x best. xx 6. y numx. z numx6.1;&lt;BR /&gt;
label x = 'x*best.'&lt;BR /&gt;
      xx = 'xx*w.d without d'&lt;BR /&gt;
      y = 'y*numx.'&lt;BR /&gt;
      z = 'z*numx6.1';&lt;BR /&gt;
run;&lt;BR /&gt;
   &lt;BR /&gt;
proc print data=test split='*';&lt;BR /&gt;
run;&lt;BR /&gt;
  &lt;BR /&gt;
[/pre]&lt;BR /&gt;
produces this output...where you can see that numx without a 'd' is working the same way that the w.d works without a 'd' .&lt;BR /&gt;
[pre]&lt;BR /&gt;
         x           xx            y         z&lt;BR /&gt;
Obs    best.    w.d without d    numx.    numx6.1&lt;BR /&gt;
  &lt;BR /&gt;
 1      4.5             5          5         4,5&lt;BR /&gt;
 2        4             4          4         4,0&lt;BR /&gt;
  &lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Since you said that you were exporting from WRS, your best bet for help might be to contact Tech Support. I can't think of a solution using SAS-supplied formats. It seems that what you'd like to have is a BESTX format, but since we don't have that, you may have to find some other workarounds.&lt;BR /&gt;
&lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 18 Oct 2007 20:38:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/BEST-format-with-comma-as-decimal-point/m-p/5124#M202</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-10-18T20:38:53Z</dc:date>
    </item>
    <item>
      <title>Re: BEST-format, with comma as decimal point</title>
      <link>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/BEST-format-with-comma-as-decimal-point/m-p/5125#M203</link>
      <description>Thanks, I guess &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; &lt;BR /&gt;
&lt;BR /&gt;
You're right, I need a BESTX format. I'll try to find a workaround instead.&lt;BR /&gt;
&lt;BR /&gt;
/Thomas &lt;BR /&gt;
(alias RoseBowl)</description>
      <pubDate>Fri, 19 Oct 2007 13:25:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Microsoft-Integration-with-SAS/BEST-format-with-comma-as-decimal-point/m-p/5125#M203</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-10-19T13:25:04Z</dc:date>
    </item>
  </channel>
</rss>

