<?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 How to summarize numbers (with 2 dots) that are stored in macro variable? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15948#M2167</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please help me understand why would a number have 2 dots. Can this 25.598.659 be assumed as 25,598,659? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Feb 2012 21:24:58 GMT</pubDate>
    <dc:creator>Hima</dc:creator>
    <dc:date>2012-02-27T21:24:58Z</dc:date>
    <item>
      <title>How to summarize numbers (with 2 dots) that are stored in macro variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15947#M2166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; I have one question. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a numers in commax30. format which are saved in macro variable. (e.g.&amp;nbsp; first numer= 35.258.698, second numer=58.258.369 an so one.., every numer contains &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;2 dots&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When i try to summarize this two or more numer i get an error bescause numbers has 2 dots.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried with more combinations and i do not know how to resolve this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The numbers must be in defined formats commax30. and i do not want define duplicate macro variable just for summarizing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone have any idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let var1=25.598.659;&lt;/P&gt;&lt;P&gt;%let var2=32.589.124;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let sum=%syseval(&amp;amp;var1+&amp;amp;var2);&lt;/P&gt;&lt;P&gt;%put &amp;amp;sum;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thx for help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mladen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 20:43:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15947#M2166</guid>
      <dc:creator>Bassi</dc:creator>
      <dc:date>2012-02-27T20:43:58Z</dc:date>
    </item>
    <item>
      <title>How to summarize numbers (with 2 dots) that are stored in macro variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15948#M2167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please help me understand why would a number have 2 dots. Can this 25.598.659 be assumed as 25,598,659? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 21:24:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15948#M2167</guid>
      <dc:creator>Hima</dc:creator>
      <dc:date>2012-02-27T21:24:58Z</dc:date>
    </item>
    <item>
      <title>How to summarize numbers (with 2 dots) that are stored in macro variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15949#M2168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because my client wants result in this format. 25,598,659 is not acceptable format for my reports.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can define duplicate macro variable but this is too complicated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, i try to fine &lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;more elegant&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;solution.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Thx for questions.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 21:43:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15949#M2168</guid>
      <dc:creator>Bassi</dc:creator>
      <dc:date>2012-02-27T21:43:50Z</dc:date>
    </item>
    <item>
      <title>How to summarize numbers (with 2 dots) that are stored in macro variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15950#M2169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Couldn't you just use the commaxw.d format for your reports?&amp;nbsp; see:&lt;/P&gt;&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000200612.htm"&gt;http://support.sas.com/documentation/cdl/en/lrdict/64316/HTML/default/viewer.htm#a000200612.htm&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 22:39:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15950#M2169</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2012-02-27T22:39:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to summarize numbers (with 2 dots) that are stored in macro variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15951#M2170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it basically the european format for a number, decimal instead of comma?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think Hima's question needs to be answered, otherwise how do the numbers add together, ie Do all numbers have 2 periods and do all have 8 digits?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Assuming you can't just use the commax format in your final report and store intermediaries in the north american standard notation my suggestion would be to convert to comma notation and the reconvert back to commax format.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let var1=25.598.659;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let var2=32.589.124;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let cvar1=%sysfunc(inputn(&amp;amp;var1, commax30.));&lt;/P&gt;&lt;P&gt;%let cvar2=%sysfunc(inputn(&amp;amp;var2, commax30.));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%put &amp;amp;var1 &amp;amp;var2 &amp;amp;cvar1 &amp;amp;cvar2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;%let sum=%sysfunc(putn(%sysevalf(&amp;amp;cvar1 +&amp;amp;cvar1), commax30.)); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Feb 2012 22:47:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15951#M2170</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-02-27T22:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to summarize numbers (with 2 dots) that are stored in macro variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15952#M2171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you are creating the macro variables as text somewhere DON'T use a format until final output. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 00:15:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15952#M2171</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-02-28T00:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to summarize numbers (with 2 dots) that are stored in macro variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15953#M2172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps alt-edited"&gt;Thanks everyone&lt;/SPAN&gt; &lt;SPAN class="hps"&gt;for help &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="short_text" id="result_box" lang="en"&gt;&lt;SPAN class="hps"&gt;and suggestions.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;I will try some of this solutions.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Thx, one more time.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="short_text" lang="en"&gt;&lt;SPAN class="hps"&gt;Mladen&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Feb 2012 06:39:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15953#M2172</guid>
      <dc:creator>Bassi</dc:creator>
      <dc:date>2012-02-28T06:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to summarize numbers (with 2 dots) that are stored in macro variable?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15954#M2173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what about when we have commaxw.d, when &lt;STRONG&gt;d&amp;gt;0&lt;/STRONG&gt;?&amp;nbsp; &lt;/P&gt;&lt;P&gt;for example &lt;/P&gt;&lt;P&gt;%let var1=25.598.659,6;&lt;/P&gt;&lt;P&gt;%let var2=32.589.124,9;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advanced.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Mar 2012 13:54:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-summarize-numbers-with-2-dots-that-are-stored-in-macro/m-p/15954#M2173</guid>
      <dc:creator>tihoz</dc:creator>
      <dc:date>2012-03-06T13:54:32Z</dc:date>
    </item>
  </channel>
</rss>

