<?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: Percent format for comma values in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489776#M127958</link>
    <description>&lt;P&gt;Or&lt;/P&gt;
&lt;PRE&gt;data test ;
  input number numx12. ;
  format number percent15.5 ;
cards;
-0,01259870
;
run;&lt;/PRE&gt;</description>
    <pubDate>Fri, 24 Aug 2018 21:21:17 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2018-08-24T21:21:17Z</dc:date>
    <item>
      <title>Percent format for comma values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489131#M127619</link>
      <description>&lt;P&gt;I ran the following code and end up with error as follows. Could you please help me with the format which translate comma values to percent? I don't wish to do any data manipulation here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data foo; 
format y percent7.1; 
y=-0,01259870; 
run;
proc print data=foo; 
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Log:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;26         data foo;
27         format y percent7.1;
28         y=-0,01259870;
               _
               388
               200
ERROR 388-185: Expecting an arithmetic operator.

ERROR 200-322: The symbol is not recognized and will be ignored.&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Desired output:&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1.3%&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 05:57:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489131#M127619</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-08-23T05:57:04Z</dc:date>
    </item>
    <item>
      <title>Re: Percent format for comma values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489132#M127620</link>
      <description>you should use dot instead of comma&lt;BR /&gt;please try&lt;BR /&gt;&lt;BR /&gt;data foo; &lt;BR /&gt;format y percent7.1; &lt;BR /&gt;y=-0.01259870; &lt;BR /&gt;run;&lt;BR /&gt;proc print data=foo; &lt;BR /&gt;run;&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Aug 2018 05:59:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489132#M127620</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2018-08-23T05:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Percent format for comma values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489134#M127621</link>
      <description>&lt;P&gt;No, I no need to convert comma to dot. I have values in my file like&amp;nbsp;&lt;SPAN&gt;-0,01259870&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Aug 2018 06:23:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489134#M127621</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-08-23T06:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: Percent format for comma values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489136#M127622</link>
      <description>&lt;P&gt;then please something as below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data foo;
format y percent7.1;
y=input(tranwrd('-0,01259870',',','.'),best.);
run;
proc print data=foo;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Aug 2018 06:33:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489136#M127622</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2018-08-23T06:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Percent format for comma values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489137#M127623</link>
      <description>Is there anyway to deal this with only formats?&lt;BR /&gt;</description>
      <pubDate>Thu, 23 Aug 2018 06:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489137#M127623</guid>
      <dc:creator>Babloo</dc:creator>
      <dc:date>2018-08-23T06:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Percent format for comma values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489140#M127626</link>
      <description>As per my understanding functions would be a best approach, alternatively you could create a customized function by proc fcmp</description>
      <pubDate>Thu, 23 Aug 2018 06:59:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489140#M127626</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2018-08-23T06:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Percent format for comma values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489141#M127627</link>
      <description>&lt;P&gt;You cannot write code using that non-standard method of using commas to replace decimal points.&lt;/P&gt;
&lt;P&gt;But you can use the COMMAX informat to read strings that are written that way.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test ;
  input @1 string $12. @1 number commax12. ;
  percent=number;
  format percent percent7.1 ;
  put (_all_) (=/);
cards;
-0,01259870
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;PRE&gt;string=-0,01259870
number=-0.0125987
percent=( 1.3%)&lt;/PRE&gt;</description>
      <pubDate>Thu, 23 Aug 2018 07:02:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489141#M127627</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-08-23T07:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: Percent format for comma values</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489776#M127958</link>
      <description>&lt;P&gt;Or&lt;/P&gt;
&lt;PRE&gt;data test ;
  input number numx12. ;
  format number percent15.5 ;
cards;
-0,01259870
;
run;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Aug 2018 21:21:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Percent-format-for-comma-values/m-p/489776#M127958</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-08-24T21:21:17Z</dc:date>
    </item>
  </channel>
</rss>

