<?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: Addition of macro variables. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810878#M319784</link>
    <description>&lt;P&gt;So what is your intention to achieve? Do you want (a) report(s), or (a) dataset?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please show us a clear example of your source data like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input id points;
datalines;
1 4
2 20
3 7
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and also show what you want to get out of it as a &lt;U&gt;final&lt;/U&gt; result, and if that result depends on additional factors (selection criteria etc), show those also (including from where they come).&lt;/P&gt;</description>
    <pubDate>Sun, 01 May 2022 07:43:51 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2022-05-01T07:43:51Z</dc:date>
    <item>
      <title>Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810792#M319756</link>
      <description>&lt;P&gt;How to add the macro variables and assign it to a new observation?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%demo(1); -------- &amp;gt; 21&lt;BR /&gt;%demo(2); ---------&amp;gt; 33&lt;/P&gt;&lt;P&gt;&amp;nbsp;%demo(3); --------&amp;gt; 20&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Obtaining a new observation containing the addition of&amp;nbsp;%demo(1),&amp;nbsp;%demo(2),&amp;nbsp;%demo(3). i.e 74.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2022 11:32:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810792#M319756</guid>
      <dc:creator>starkt964</dc:creator>
      <dc:date>2022-04-30T11:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810820#M319763</link>
      <description>&lt;P&gt;Your example does not appear to contain any macro variables at all.&lt;/P&gt;
&lt;P&gt;Do the macros you are calling really only emit those digit strings as the results?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you wanted to add those three numbers you should use addition.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  want = 21 + 33 + 20;
  put want=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;The macro processor is a text replacement tool. So you could replace the text 21 with the first macro call, 33 with the second etc.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
  want = %demo(1) + %demo(2)+ %demo(3);
  put want=;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Please explain more what you are doing to get a better answer.&amp;nbsp; Also please explain where or how actual macro variables are involved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2022 15:34:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810820#M319763</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-04-30T15:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810845#M319773</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/420763"&gt;@starkt964&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;How to add the macro variables and assign it to a new observation?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;%demo(1); -------- &amp;gt; 21&lt;BR /&gt;%demo(2); ---------&amp;gt; 33&lt;/P&gt;
&lt;P&gt;&amp;nbsp;%demo(3); --------&amp;gt; 20&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Obtaining a new observation containing the addition of&amp;nbsp;%demo(1),&amp;nbsp;%demo(2),&amp;nbsp;%demo(3). i.e 74.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;You don't have macro variables, you have a macro named %DEMO. Macros and macro variables are not the same thing. Please show us the code for %DEMO. And please provide a more complete explanation of what you are doing, do not skip this step.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2022 21:02:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810845#M319773</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-04-30T21:02:31Z</dc:date>
    </item>
    <item>
      <title>Addition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810854#M319779</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The output should be a Total Points = 31.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please refer the code below.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;libname chrttgrp "/vbp/warehouse/vbp0lxr/";

data temp;
	set chrttgrp.grps;
run;

%macro demmo(idNumber);
proc sql;
	select points into:  p
	from temp
	where id = &amp;amp;idNumber;
quit;
%mend;

%demmo(1);
%demmo(2);
%demmo(3);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-05-01 at 2.31.31 AM.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71043iD265D762D787853B/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2022-05-01 at 2.31.31 AM.png" alt="Screen Shot 2022-05-01 at 2.31.31 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 06:32:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810854#M319779</guid>
      <dc:creator>starkt964</dc:creator>
      <dc:date>2022-05-01T06:32:29Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810855#M319777</link>
      <description>&lt;P&gt;Please refer to&amp;nbsp;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Addition/m-p/810854" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Addition/m-p/810854&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Apr 2022 23:39:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810855#M319777</guid>
      <dc:creator>starkt964</dc:creator>
      <dc:date>2022-04-30T23:39:39Z</dc:date>
    </item>
    <item>
      <title>Re: Addition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810857#M319780</link>
      <description>&lt;P&gt;The statement SELECT into PROC SQL is used for selecting some observations in your database. You need to summarize the results to achieve 31.&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 01:43:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810857#M319780</guid>
      <dc:creator>KaueMAlmeida</dc:creator>
      <dc:date>2022-05-01T01:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: Addition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810870#M319781</link>
      <description>&lt;P&gt;As this post is a continuation, I moved it back in here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please post logs and other fixed-width text by copy/pasting into a window openedwith this button:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For SAS code, use the "little running man" right next to it.&lt;/P&gt;
&lt;P&gt;Do not post code, logs or data as pictures.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Since we now have a glimpse of the macro, we can see it contains a SQL&amp;nbsp; step, so you cannot use it in a data step, as the created code breaks the data step logic.&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 04:59:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810870#M319781</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-05-01T04:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810876#M319783</link>
      <description>&lt;P&gt;Here is the code without the SQL query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;libname chrttgrp "/vbp/warehouse/vbp0lxr/";


%macro demmo(idNumber);
data temp;
	set chrttgrp.grps;
	keep points;
	where id = &amp;amp;idNumber;
run;
proc print data=temp;
run;

%mend;


%demmo(1);
%demmo(2);
%demmo(3);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-05-01 at 2.55.14 AM.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71044iF366045C99A9EBF9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screen Shot 2022-05-01 at 2.55.14 AM.png" alt="Screen Shot 2022-05-01 at 2.55.14 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 06:57:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810876#M319783</guid>
      <dc:creator>starkt964</dc:creator>
      <dc:date>2022-05-01T06:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810878#M319784</link>
      <description>&lt;P&gt;So what is your intention to achieve? Do you want (a) report(s), or (a) dataset?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please show us a clear example of your source data like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input id points;
datalines;
1 4
2 20
3 7
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;and also show what you want to get out of it as a &lt;U&gt;final&lt;/U&gt; result, and if that result depends on additional factors (selection criteria etc), show those also (including from where they come).&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 07:43:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810878#M319784</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-05-01T07:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: Addition</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810887#M319787</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/420763"&gt;@starkt964&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output should be a Total Points = 31.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please refer the code below.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;libname chrttgrp "/vbp/warehouse/vbp0lxr/";

data temp;
	set chrttgrp.grps;
run;

%macro demmo(idNumber);
proc sql;
	select points into:  p
	from temp
	where id = &amp;amp;idNumber;
quit;
%mend;

%demmo(1);
%demmo(2);
%demmo(3);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/420763"&gt;@starkt964&lt;/a&gt; — when data is in a SAS data set, you can add it without macros. I hope this is clear, because this is an important fundamental understanding that you need to have to use SAS effectively. Macros are simply not necessary, and are an over-complication. You will work much harder use macros to perform arithmetic on data in SAS data sets than if you use the proper SAS tools. In this case, the proper tool to add numbers in SAS data set is PROC SUMMARY.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=chrttgrp.grps(where=(id in (1,2,3)));
    var points; 
    output out=_sum_ sum=sum_points;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 10:38:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810887#M319787</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-01T10:38:17Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810897#M319791</link>
      <description>&lt;P&gt;Yes. My bad not expressing it correctly. Let's re-iterate over the problem statement.&lt;/P&gt;&lt;P&gt;So, the intention is to achieve a dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The data is:-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2022-05-01 at 6.58.17 AM.png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71047iAD3C7EE99F8C0FE5/image-size/small?v=v2&amp;amp;px=200" role="button" title="Screen Shot 2022-05-01 at 6.58.17 AM.png" alt="Screen Shot 2022-05-01 at 6.58.17 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The output of the data:-&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Screen Shot 2022-05-01 at 6.57.33 AM.png" style="width: 174px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/71048i101F80418445399F/image-dimensions/174x81?v=v2" width="174" height="81" role="button" title="Screen Shot 2022-05-01 at 6.57.33 AM.png" alt="Screen Shot 2022-05-01 at 6.57.33 AM.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So basically, a new dataset containing the addition of different observations.&lt;/P&gt;&lt;P&gt;eg:- revenue = 4 + 20 + 7.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 11:09:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810897#M319791</guid>
      <dc:creator>starkt964</dc:creator>
      <dc:date>2022-05-01T11:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810900#M319794</link>
      <description>&lt;P&gt;My PROC SUMMARY code does this. No macros needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your output table seems to have nothing to do with the data you show, there is no variable with the value "revenue" and no variable with the value "debt" in your data set. It really helps us if your output data is correct for the input you show.&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 11:18:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810900#M319794</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-01T11:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810901#M319795</link>
      <description>&lt;P&gt;How do your current values of variable &lt;EM&gt;name&lt;/EM&gt; correspond to the values "revenue" and "debt" in your "want" dataset?&lt;/P&gt;
&lt;P&gt;From first look, a format and PROC SUMMARY is all you need.&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 11:33:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810901#M319795</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-05-01T11:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810903#M319797</link>
      <description>&lt;P&gt;There is no reference to the "revenue" and "debt" in the "want" dataset. The revenue and debt needs to be generated by ourselves with the summation of (not all) the points and to be saved inside the new dataset.&lt;BR /&gt;&lt;BR /&gt;eg:- revenue = 4 + 20 + 7&lt;BR /&gt;debt = 20 + 7&lt;BR /&gt;tax = 20&lt;BR /&gt;.....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 12:37:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810903#M319797</guid>
      <dc:creator>starkt964</dc:creator>
      <dc:date>2022-05-01T12:37:58Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810907#M319799</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/420763"&gt;@starkt964&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The concept that you need to understand is that SAS works with SAS data sets, and then code produces the desired answer.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So ... we need the SAS data set you are working with, not word descriptions like you just provided. We need (a portion of) the data provided as SAS data step code, or via &lt;A href="https://blogs.sas.com/content/sastraining/2016/03/11/jedi-sas-tricks-data-to-data-step-macro/" target="_self"&gt;these instructions&lt;/A&gt; so we can actually write code to work on the data set. Do not provide the data via other methods, do not provide the data as screen captures, do not provide the data as Excel files.&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 12:59:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810907#M319799</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-01T12:59:42Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810919#M319803</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please find the dataset below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data WORK.chrrt;
  infile datalines dsd truncover;
  input Id:BEST. Name:$28. Points:$2.;
  format Id BEST.;
  label Id="Id" Name="Name" Points="Points";
datalines4;
1,Accounts Receivable,4
2,Cash Equivalents,20
3,Current Asset,7
4,Long Term Receivables,24
5,Other Long Term Investments,25
6,Other Asset,9
7,Cash,1
8,Bank,2
9,Credit Card Receivable,3
10,Marketable Securities,21
11,Allowance for Bad Debts,22
12,Other Receivables,5
13,Other Current Asset,23
14,Inventory,6
15,Capital Asset,8
16,Accum. Amort. &amp;amp; Depreciation,26
17,Asset,0
18,Other Non-Current Asset,27
19,Accounts Payable,4
20,Liability,0
21,Cash,1
22,Bank,2
23,Current Liability,7
24,Credit Card Payable,3
25,Other Current Liability,25
26,Other Non-Current Liability,28
27,Debt,6
28,Deferred Income Taxes,29
29,Other Liability,9
30,Other Payable,5
31,Short Term Debt,24
32,Income Tax Payable,23
33,Payroll Tax Payable,21
34,Employee Deductions Payable,22
35,Sales Tax Payable,20
36,Deferred Revenue,27
37,Long Term Debt,26
38,Long Term Liability,8
39,Equity,0
40,Cash,1
41,Bank,2
42,Credit Card Payable,3
43,Owner/Partner Contributions,4
44,Owner/Partner Witdrawals,5
45,Dividends,20
46,Share Capital,6
47,Retained Earnings,7
48,Current Earnings,8
49,Revenue,0
50,Farming Revenue,22
51,Other Revenue,1
52,Gain,23
53,Extraordinary Gain,24
54,Operating Revenue,20
55,Non-Operating Revenue,21
56,Non-Operating Expense,26
57,Extraordinary Loss,28
58,Cost of Goods Sold,1
59,Operating Expense,20
60,Payroll Expense,2
61,Employee Benefits,23
62,Expense,0
63,General &amp;amp; Admin. Expense,3
64,Bad Debt Expense,22
65,Interest Expense,24
66,Amort./Depreciation Expense,21
67,Income Tax Expense,25
68,Loss,27
69,Rent,0
70,Capital and Interest,0
;;;;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 01 May 2022 14:05:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810919#M319803</guid>
      <dc:creator>starkt964</dc:creator>
      <dc:date>2022-05-01T14:05:35Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810931#M319812</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Why do you confuse us with "revenue" and "debt", when these are not a part of your data set?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The output you want, the addition of ID 1 2 and 3, is obtained via the PROC SUMMARY code I presented earlier. Again, no macros needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 15:20:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810931#M319812</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-01T15:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810934#M319815</link>
      <description>No, the addition of 1, 2 and 3 needs to be saved in the variable "revenue" likewise with "debt" and needs to be stored in another file.</description>
      <pubDate>Sun, 01 May 2022 15:29:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810934#M319815</guid>
      <dc:creator>starkt964</dc:creator>
      <dc:date>2022-05-01T15:29:30Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810947#M319826</link>
      <description>&lt;P&gt;And which IDs need to be summed for "debt"?&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 17:56:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810947#M319826</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2022-05-01T17:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Addition of macro variables.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810948#M319827</link>
      <description>&lt;P&gt;So your POINTS variable needs to be numeric, not character, if you want to SUM it&lt;/P&gt;
&lt;P&gt;Your current NAME variable has a few values that repeat.&amp;nbsp; Should the points for those names be collapsed?&amp;nbsp; Or should the names be made distinct in some way?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You need another variable that describes the category (for example DEBT or REVENUE ) for each of the NAME values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 May 2022 18:05:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Addition-of-macro-variables/m-p/810948#M319827</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-05-01T18:05:11Z</dc:date>
    </item>
  </channel>
</rss>

