<?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 Decimal in macro variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924317#M363829</link>
    <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm wondering how to get the decimal after the sum statement, the decimal doesn't appear in my macro variable Montant_EU. My code is&amp;nbsp; :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
            select sum("Montant EU "n)
            into : Montant_EU 
            from base_finale;
      quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Thank you for your help !&lt;/P&gt;</description>
    <pubDate>Mon, 15 Apr 2024 08:57:35 GMT</pubDate>
    <dc:creator>SASdevAnneMarie</dc:creator>
    <dc:date>2024-04-15T08:57:35Z</dc:date>
    <item>
      <title>Decimal in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924317#M363829</link>
      <description>&lt;P&gt;Hello Experts,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm wondering how to get the decimal after the sum statement, the decimal doesn't appear in my macro variable Montant_EU. My code is&amp;nbsp; :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
            select sum("Montant EU "n)
            into : Montant_EU 
            from base_finale;
      quit;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;Thank you for your help !&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 08:57:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924317#M363829</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2024-04-15T08:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924318#M363830</link>
      <description>&lt;P&gt;I think you don't have any decimals (the sum is an integer).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway,&lt;/P&gt;
&lt;P&gt;if you absolutely want decimals&amp;nbsp;&lt;/P&gt;
&lt;P&gt;, here's one way to get them.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
            select put(avg(Weight),comma14.7) 
            into :Montant_EU trimmed 
            from sashelp.class;
quit;

%PUT &amp;amp;=Montant_EU;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 09:18:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924318#M363830</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2024-04-15T09:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924326#M363836</link>
      <description>Thank you! Why %eval function doesn't work for this macro variable : &lt;BR /&gt;%let tx=%eval(&amp;amp;Montant_EU+1) ?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Apr 2024 10:36:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924326#M363836</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2024-04-15T10:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924330#M363838</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/286185"&gt;@SASdevAnneMarie&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thank you! Why %eval function doesn't work for this macro variable : &lt;BR /&gt;%let tx=%eval(&amp;amp;Montant_EU+1) ?&lt;BR /&gt;&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What about this doesn't work?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 10:49:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924330#M363838</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2024-04-15T10:49:19Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924331#M363839</link>
      <description>&lt;P&gt;You could use "sysevalf" :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql noprint;
            select put(avg(Weight),comma14.7) 
            into :Montant_EU trimmed 
            from sashelp.class;
quit;

%PUT &amp;amp;=Montant_EU;

%LET tx=%sysevalf(&amp;amp;Montant_EU.+1);
%PUT &amp;amp;=tx;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Koen&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 10:57:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924331#M363839</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2024-04-15T10:57:16Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924332#M363840</link>
      <description>&lt;P&gt;%EVAL is for integer evaluations, for floating point you need %SYSEVALF.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 11:04:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924332#M363840</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2024-04-15T11:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924343#M363842</link>
      <description>&lt;P&gt;This code doesn't work on my EG, I have this erros :&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SASdevAnneMarie_0-1713181414891.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/95544iDBBCAF8447B899AB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="SASdevAnneMarie_0-1713181414891.png" alt="SASdevAnneMarie_0-1713181414891.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 11:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924343#M363842</guid>
      <dc:creator>SASdevAnneMarie</dc:creator>
      <dc:date>2024-04-15T11:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924349#M363846</link>
      <description>&lt;P&gt;Can you copy / paste the full code (as part of the full log)?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;UL class="lia-list-style-type-square"&gt;
&lt;LI&gt;Copy in EGuide&lt;/LI&gt;
&lt;LI&gt;Then use the &amp;lt;/&amp;gt; icon in the header&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Then paste in the pop-up window.&lt;/LI&gt;
&lt;LI&gt;(Avoid screenshots here)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Koen&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 12:06:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924349#M363846</guid>
      <dc:creator>sbxkoenk</dc:creator>
      <dc:date>2024-04-15T12:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924354#M363849</link>
      <description>&lt;P&gt;That looks like&amp;nbsp; an un-related problem.&amp;nbsp; It looks like at some point in the SAS session, you may have submitted a block of code with unmatched quotation marks.&amp;nbsp; If you get this problem repeatedly, the easiest thing is to exit EG and then restart, and then search your code for unmatched quotation marks.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 12:54:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924354#M363849</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2024-04-15T12:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924360#M363851</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;That looks like&amp;nbsp; an un-related problem.&amp;nbsp; It looks like at some point in the SAS session, you may have submitted a block of code with unmatched quotation marks.&amp;nbsp; If you get this problem repeatedly, the easiest thing is to exit EG and then restart, and then search your code for unmatched quotation marks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No need to exit Enterprise Guide.&amp;nbsp; Just restart the SAS session that Enterprise Guide is using to run the SAS code.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 13:09:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924360#M363851</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-04-15T13:09:54Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924370#M363855</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/19879"&gt;@Quentin&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;That looks like&amp;nbsp; an un-related problem.&amp;nbsp; It looks like at some point in the SAS session, you may have submitted a block of code with unmatched quotation marks.&amp;nbsp; If you get this problem repeatedly, the easiest thing is to exit EG and then restart, and then search your code for unmatched quotation marks.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No need to exit Enterprise Guide.&amp;nbsp; Just restart the SAS session that Enterprise Guide is using to run the SAS code.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;But is there an easy way to restart the session?&amp;nbsp; The best way I have found is to right-click the server and select disconnect, then right-click again and select connect.&amp;nbsp; I would love it if there was a "restart session" button / menu item I could refer folks to.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 13:48:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924370#M363855</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2024-04-15T13:48:50Z</dc:date>
    </item>
    <item>
      <title>Re: Decimal in macro variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924382#M363859</link>
      <description>&lt;P&gt;Disconnect/select sounds the same as restart, just in two steps instead of one.&amp;nbsp; Still better than leaving the application completely and having to restart the application.&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2024 14:21:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Decimal-in-macro-variable/m-p/924382#M363859</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2024-04-15T14:21:13Z</dc:date>
    </item>
  </channel>
</rss>

