<?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>octrout Tracker</title>
    <link>https://communities.sas.com/kntur85557/tracker</link>
    <description>octrout Tracker</description>
    <pubDate>Mon, 09 Mar 2026 06:32:33 GMT</pubDate>
    <dc:date>2026-03-09T06:32:33Z</dc:date>
    <item>
      <title>Re: sum two columns from two tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sum-two-columns-from-two-tables/m-p/355467#M264730</link>
      <description>&lt;P&gt;How do I subtract instead of sums ? Thanks !&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token comment"&gt;/* Increment the sums and copy results back to NUM_A and NUM_B */&lt;/SPAN&gt;
  do I&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token number"&gt;1&lt;/SPAN&gt; to &lt;SPAN class="token function"&gt;dim&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;sums&lt;SPAN class="token punctuation"&gt;)&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
    sums&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;i&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt;nums&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;I&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
    nums&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;I&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;sums&lt;SPAN class="token punctuation"&gt;{&lt;/SPAN&gt;I&lt;SPAN class="token punctuation"&gt;}&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;
  end&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 May 2017 03:27:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sum-two-columns-from-two-tables/m-p/355467#M264730</guid>
      <dc:creator>octrout</dc:creator>
      <dc:date>2017-05-03T03:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: sum two columns from two tables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sum-two-columns-from-two-tables/m-p/355388#M264728</link>
      <description>Hi, Can this be done in data step ?</description>
      <pubDate>Tue, 02 May 2017 20:23:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sum-two-columns-from-two-tables/m-p/355388#M264728</guid>
      <dc:creator>octrout</dc:creator>
      <dc:date>2017-05-02T20:23:17Z</dc:date>
    </item>
    <item>
      <title>Re: replacing value using array or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-value-using-array-or-macro/m-p/348860#M80836</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have about 60 variables that need to replace with values from one variable.&lt;/P&gt;&lt;P&gt;This would be an example data set need to replace c,d,e,f,g with values from B. &amp;nbsp;Thanks !&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input A $ B C $	D E F G ;
datalines;
CA	1	1	1 20 7 10
CA	2	B	1 2 5 18
CA	3	B	9 3 5 18
CA	4	B	8 3 3 7
CA	6	R	2 4 2 6
NV	1	B	1 4 1 9
NV	2	B	1 4 1 10
NV	3	B	1 5 7 18
NV	4	B	1 5 4 8
NV	5	B	1 5 4 7
NV	6	B	1 5 6 8
NV	1	R	4 5 7 9
NV	2	R	6 5 8 10
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 20:03:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-value-using-array-or-macro/m-p/348860#M80836</guid>
      <dc:creator>octrout</dc:creator>
      <dc:date>2017-04-10T20:03:51Z</dc:date>
    </item>
    <item>
      <title>Re: replacing value using array or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-value-using-array-or-macro/m-p/348831#M80826</link>
      <description>Thanks for the reply. What if i have many variables to replace values ?</description>
      <pubDate>Mon, 10 Apr 2017 18:49:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-value-using-array-or-macro/m-p/348831#M80826</guid>
      <dc:creator>octrout</dc:creator>
      <dc:date>2017-04-10T18:49:39Z</dc:date>
    </item>
    <item>
      <title>replacing value using array or macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/replacing-value-using-array-or-macro/m-p/348825#M80822</link>
      <description>&lt;P&gt;&lt;BR /&gt;Hi, I would like to replace values in C and D with value from B. Can anyone help to create code using array or macro ? Thank you so much !&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input A $ B C $	D ;
datalines;
CA	1	1	1
CA	2	B	1
CA	3	B	9
CA	4	B	8
CA	6	R	2
NV	1	B	1
NV	2	B	1
NV	3	B	1
NV	4	B	1
NV	5	B	1
NV	6	B	1
NV	1	R	4
NV	2	R	6
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 10 Apr 2017 18:28:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/replacing-value-using-array-or-macro/m-p/348825#M80822</guid>
      <dc:creator>octrout</dc:creator>
      <dc:date>2017-04-10T18:28:01Z</dc:date>
    </item>
    <item>
      <title>computing sum and average by every nth row</title>
      <link>https://communities.sas.com/t5/SAS-Programming/computing-sum-and-average-by-every-nth-row/m-p/348587#M80731</link>
      <description>&lt;P&gt;Hi, I would like to compute sum ( bal_rev = R ) and average (bal_rev = B) by every 3 period for each state. &amp;nbsp;Could you please help ? Thanks !&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data have;
input State $ Period Bal_Rev $ AMOUNT;
datalines;
CA 1 B 1464.48
CA 2 B 1275.81
CA 3 B 943.28
CA 4 B 849.82
CA 5 B 752.29
CA 6 B 661.56
CA 1 R 4.86
CA 2 R 4.86
CA 3 R 4.3
CA 4 R 3.57
CA 5 R 3.19
CA 6 R 2.97
NV 1 B 1047.84
NV 2 B 1045.54
NV 3 B 1092.74
NV 4 B 1110.41
NV 5 B 1134.34
NV 6 B 1105.86
NV 1 R 4.91
NV 2 R 6.09
NV 3 R 6.8
NV 4 R 5.84
NV 5 R 7.22
NV 6 R 10.16
UT 1 B 9856.37
UT 2 B 9825.48
UT 3 B 9701.09
UT 4 B 9497.63
UT 5 B 9448.09
UT 6 B 9293.51
UT 1 R 13.09
UT 2 R 12.7
UT 3 R 11.35
UT 4 R 8.14
UT 5 R 16.72
UT 6 R 16.19
;
run;

data want;;
set have;
if bal_rev ='B' then do;
/* average value for every 3 period for each state */
end;
if bal_rev = 'R' then do;
/* sum value for every 3 period for each state */
end;
run;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Apr 2017 04:44:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/computing-sum-and-average-by-every-nth-row/m-p/348587#M80731</guid>
      <dc:creator>octrout</dc:creator>
      <dc:date>2017-04-10T04:44:51Z</dc:date>
    </item>
  </channel>
</rss>

