<?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: sum in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56094#M11967</link>
    <description>I go through the sas document but i could not able to get it.&lt;BR /&gt;
 so please explain me.&lt;BR /&gt;
&lt;BR /&gt;
thanks in advance.</description>
    <pubDate>Sat, 13 Feb 2010 12:15:31 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-02-13T12:15:31Z</dc:date>
    <item>
      <title>sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56092#M11965</link>
      <description>what is the significant of the 'OF'in x=sum(OF a1-a4,a6,a9);</description>
      <pubDate>Fri, 12 Feb 2010 12:23:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56092#M11965</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-02-12T12:23:11Z</dc:date>
    </item>
    <item>
      <title>Re: sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56093#M11966</link>
      <description>It is the "signal" for the following is a "SAS Variable List".  Without it the argument is A1 minus A4.&lt;BR /&gt;
&lt;BR /&gt;
Look a documentation for "SAS Variable Lists".

Message was edited by: data _null_;</description>
      <pubDate>Fri, 12 Feb 2010 12:46:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56093#M11966</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-02-12T12:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56094#M11967</link>
      <description>I go through the sas document but i could not able to get it.&lt;BR /&gt;
 so please explain me.&lt;BR /&gt;
&lt;BR /&gt;
thanks in advance.</description>
      <pubDate>Sat, 13 Feb 2010 12:15:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56094#M11967</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-02-13T12:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56095#M11968</link>
      <description>a refers to an array&lt;BR /&gt;
a1 is the first element of the array&lt;BR /&gt;
sum(a1,a2,a3,a4) can be shorted handed to sum(of a1-a4)&lt;BR /&gt;
hope that answer your question</description>
      <pubDate>Sat, 13 Feb 2010 14:27:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56095#M11968</guid>
      <dc:creator>BW</dc:creator>
      <dc:date>2010-02-13T14:27:27Z</dc:date>
    </item>
    <item>
      <title>Re: sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56096#M11969</link>
      <description>&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000695105.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/61722/HTML/default/a000695105.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000245953.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000245953.htm&lt;/A&gt;</description>
      <pubDate>Sat, 13 Feb 2010 15:58:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56096#M11969</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2010-02-13T15:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56097#M11970</link>
      <description>Hi:&lt;BR /&gt;
  As a teacher, I am honor bound to add some SAS-related elaboration to the post about A1-A4 as being in ARRAY A.&lt;BR /&gt;
&lt;BR /&gt;
  In some languages, the list of variables or fields named A1-A4 &lt;B&gt;WOULD&lt;/B&gt; automatically be an array reference to the array named A. And the array named A would, in some languages, be a physical data construct.&lt;BR /&gt;
 &lt;BR /&gt;
  In SAS, however, an ARRAY is &lt;U&gt;not&lt;/U&gt; a physical data construct. The name of the array is declared in an ARRAY statement (either in a DATA step program or in some of the STAT procedures that allow ARRAY references) and does not have to bear any relationship at all to the numbered (or unnumbered) variable list that defines the array members.&lt;BR /&gt;
&lt;BR /&gt;
  So, for example, these are all valid ARRAY declarations in a SAS DATA step program (for numeric variables):&lt;BR /&gt;
[pre]&lt;BR /&gt;
array a a1-a4;&lt;BR /&gt;
array wombat a1-a4;&lt;BR /&gt;
array unord a3 a1 a4 a2;&lt;BR /&gt;
array lovelucy fred ethel lucy ricky;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
  Only the first ARRAY statement declares the variable name to be 'A'. In the above ARRAY statements, the references point to the following variables:&lt;BR /&gt;
[pre]&lt;BR /&gt;
Array     Array       Refers to&lt;BR /&gt;
Name      Reference   SAS Variable&lt;BR /&gt;
-------- ----------- -----------&lt;BR /&gt;
A         A(2)          A2&lt;BR /&gt;
WOMBAT    WOMBAT(2)     A2&lt;BR /&gt;
UNORD     UNORD(2)      A1&lt;BR /&gt;
LOVELUCY  LOVELUCY(2)  ETHEL&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
  When a SAS dataset is not actively being used in a DATA step program, you will never see the declared array NAME (A, WOMBAT, UNORD, or LOVELUCY) in the descriptor portion of the SAS dataset (as with a PROC CONTENTS or a PROC DATASETS). You -will- see the variables, ALL the variables, in the descriptor portion of the dataset.&lt;BR /&gt;
 &lt;BR /&gt;
  So, if your dataset contains numbered variables, such as A1, A2, A3, A4 or YR1999, YR2000, YR2001, YR2002, it sometimes becomes tedious to list all the variables one after the other in code. Many SAS statements, functions and options allow you to use variable lists (in a variety of forms), as shown in the documentation, as a referencing shortcut. &lt;BR /&gt;
 &lt;BR /&gt;
  For example, if you use the SUM function, the use of 'OF' in the SUM function, as described here:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000245953.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000245953.htm&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
  You could have:&lt;BR /&gt;
[pre]&lt;BR /&gt;
total = sum(a1, a2, a3, a4); &lt;BR /&gt;
OR&lt;BR /&gt;
total = sum(lucy, ricky, fred, ethel);&lt;BR /&gt;
OR&lt;BR /&gt;
total = sum(OF a1-a4);&lt;BR /&gt;
OR&lt;BR /&gt;
total=sum(OF a1-a4, a5, a6);&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
  IF you had declared an ARRAY in a DATA step program, you might use a DO loop to accumulate or create a new variable from the members of an array. However, the original question was about the SUM function, so I'll end here. The bottom line is that numbered variables do not automatically mean that the numbered variables are in an ARRAY -- that is frequently one usage of numbered variables -- but not an automatic usage.&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Sat, 13 Feb 2010 17:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56097#M11970</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2010-02-13T17:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56098#M11971</link>
      <description>can you explain me what is a "signal"?</description>
      <pubDate>Mon, 15 Feb 2010 12:18:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56098#M11971</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-02-15T12:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: sum</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56099#M11972</link>
      <description>In this context, the use of "signal" simply means this technique is using a SAS programming/code argument "OF" and when coded as shown it is treated differently than a more typical SUM(...) function execution.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Google advanced search argument, this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
sum function site:sas.com&lt;BR /&gt;
&lt;BR /&gt;
-&amp;gt; generated several results, including the link below were "OF" is explained in the SUM function documentation:&lt;BR /&gt;
&lt;BR /&gt;
SAS Language Reference: Dictionary, SUM Function:&lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000245953.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrdict/62618/HTML/default/a000245953.htm&lt;/A&gt;</description>
      <pubDate>Mon, 15 Feb 2010 13:51:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sum/m-p/56099#M11972</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-02-15T13:51:12Z</dc:date>
    </item>
  </channel>
</rss>

