<?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: how to position the columns in the same observation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-position-the-columns-in-the-same-observation/m-p/42147#M8658</link>
    <description>in a data step I would define an array using the :  (colon) suffix to include all the colXX variables and just accumulate the last 3  like&lt;BR /&gt;
Array cols(*) col: ;&lt;BR /&gt;
last3 =  0 ;&lt;BR /&gt;
do idx = dim(cols) to dim(cols)-2;&lt;BR /&gt;
  last3+cols( idx);&lt;BR /&gt;
end;&lt;BR /&gt;
&lt;BR /&gt;
Then no matter how many COLxx columns are present only the last 3 are summed</description>
    <pubDate>Sun, 03 Apr 2011 02:22:40 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2011-04-03T02:22:40Z</dc:date>
    <item>
      <title>how to position the columns in the same observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-position-the-columns-in-the-same-observation/m-p/42146#M8657</link>
      <description>for instance:&lt;BR /&gt;
&lt;BR /&gt;
one of the observation from the datasets:&lt;BR /&gt;
&lt;BR /&gt;
total of 60 columns&lt;BR /&gt;
col1 col2 col3 col4....col60.&lt;BR /&gt;
&lt;BR /&gt;
i would like to perform the calculations for the last three columns, such as col58 col59 col60. &lt;BR /&gt;
&lt;BR /&gt;
the total of the columns is changing. how can i calculate the total of col58..col60</description>
      <pubDate>Fri, 01 Apr 2011 05:28:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-position-the-columns-in-the-same-observation/m-p/42146#M8657</guid>
      <dc:creator>jdk123</dc:creator>
      <dc:date>2011-04-01T05:28:04Z</dc:date>
    </item>
    <item>
      <title>Re: how to position the columns in the same observation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-position-the-columns-in-the-same-observation/m-p/42147#M8658</link>
      <description>in a data step I would define an array using the :  (colon) suffix to include all the colXX variables and just accumulate the last 3  like&lt;BR /&gt;
Array cols(*) col: ;&lt;BR /&gt;
last3 =  0 ;&lt;BR /&gt;
do idx = dim(cols) to dim(cols)-2;&lt;BR /&gt;
  last3+cols( idx);&lt;BR /&gt;
end;&lt;BR /&gt;
&lt;BR /&gt;
Then no matter how many COLxx columns are present only the last 3 are summed</description>
      <pubDate>Sun, 03 Apr 2011 02:22:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-position-the-columns-in-the-same-observation/m-p/42147#M8658</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-04-03T02:22:40Z</dc:date>
    </item>
  </channel>
</rss>

