<?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: sas array dynamic name in Developers</title>
    <link>https://communities.sas.com/t5/Developers/sas-array-dynamic-name/m-p/4286#M1928</link>
    <description>an array can hold only numeric values, or only character values, like [pre]&lt;BR /&gt;
* presuming large table is addressable as  large.dataSet;&lt;BR /&gt;
data  results ;&lt;BR /&gt;
&lt;BR /&gt;
 set large.dataSet   ;&lt;BR /&gt;
&lt;BR /&gt;
  array thisC(*) _character_ ; &lt;BR /&gt;
  array thisN(*) _numeric_ ;&lt;BR /&gt;
&lt;BR /&gt;
  do col= 1 to dim( thisC ) ;&lt;BR /&gt;
      this_name = vname( thisC(col) );&lt;BR /&gt;
&lt;BR /&gt;
      * process character columns ;&lt;BR /&gt;
&lt;BR /&gt;
  end;&lt;BR /&gt;
&lt;BR /&gt;
  do col= 1 to dim( thisN ) ;&lt;BR /&gt;
      this_name = vname( thisN(col) );&lt;BR /&gt;
&lt;BR /&gt;
      * process numeric columns ;&lt;BR /&gt;
&lt;BR /&gt;
  end;&lt;BR /&gt;
&lt;BR /&gt;
run; [/pre]&lt;BR /&gt;
&lt;BR /&gt;
Good Luck&lt;BR /&gt;
PeterC</description>
    <pubDate>Thu, 23 Aug 2007 09:28:21 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-08-23T09:28:21Z</dc:date>
    <item>
      <title>sas array dynamic name</title>
      <link>https://communities.sas.com/t5/Developers/sas-array-dynamic-name/m-p/4285#M1927</link>
      <description>please let me know?&lt;BR /&gt;
1)how I can define an aaray whose arguments name is my sas data set name (vars)&lt;BR /&gt;
2)then I would like to do calculations on each var.&lt;BR /&gt;
 my data set is huge like more than 500 columns so I can not explicitly name them, is there any daynamic way?</description>
      <pubDate>Wed, 22 Aug 2007 21:40:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/sas-array-dynamic-name/m-p/4285#M1927</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-08-22T21:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: sas array dynamic name</title>
      <link>https://communities.sas.com/t5/Developers/sas-array-dynamic-name/m-p/4286#M1928</link>
      <description>an array can hold only numeric values, or only character values, like [pre]&lt;BR /&gt;
* presuming large table is addressable as  large.dataSet;&lt;BR /&gt;
data  results ;&lt;BR /&gt;
&lt;BR /&gt;
 set large.dataSet   ;&lt;BR /&gt;
&lt;BR /&gt;
  array thisC(*) _character_ ; &lt;BR /&gt;
  array thisN(*) _numeric_ ;&lt;BR /&gt;
&lt;BR /&gt;
  do col= 1 to dim( thisC ) ;&lt;BR /&gt;
      this_name = vname( thisC(col) );&lt;BR /&gt;
&lt;BR /&gt;
      * process character columns ;&lt;BR /&gt;
&lt;BR /&gt;
  end;&lt;BR /&gt;
&lt;BR /&gt;
  do col= 1 to dim( thisN ) ;&lt;BR /&gt;
      this_name = vname( thisN(col) );&lt;BR /&gt;
&lt;BR /&gt;
      * process numeric columns ;&lt;BR /&gt;
&lt;BR /&gt;
  end;&lt;BR /&gt;
&lt;BR /&gt;
run; [/pre]&lt;BR /&gt;
&lt;BR /&gt;
Good Luck&lt;BR /&gt;
PeterC</description>
      <pubDate>Thu, 23 Aug 2007 09:28:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/sas-array-dynamic-name/m-p/4286#M1928</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-08-23T09:28:21Z</dc:date>
    </item>
    <item>
      <title>Re: sas array dynamic name</title>
      <link>https://communities.sas.com/t5/Developers/sas-array-dynamic-name/m-p/4287#M1929</link>
      <description>it is great to know this Peter, I was not ware of this function.&lt;BR /&gt;
what I was actually trying to do is to subtract each column, my data set is lik this&lt;BR /&gt;
&lt;BR /&gt;
cus_id          Bal_1   Bal_2 ... Bal_500&lt;BR /&gt;
1                    10       15   ....     50&lt;BR /&gt;
..&lt;BR /&gt;
&lt;BR /&gt;
and I would like to subtract Bal_2 - Bal_1 as Net_Growth1 , then Bal_3 - Bal_2 as Net_Growth2 and so on, if I could do it in an array it is great.</description>
      <pubDate>Thu, 23 Aug 2007 15:05:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/sas-array-dynamic-name/m-p/4287#M1929</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-08-23T15:05:36Z</dc:date>
    </item>
    <item>
      <title>Re: sas array dynamic name</title>
      <link>https://communities.sas.com/t5/Developers/sas-array-dynamic-name/m-p/4288#M1930</link>
      <description>SAS online doc has a section on data step concepts, with a chapter on arrays at&lt;BR /&gt;
&lt;A href="http://support.sas.com/onlinedoc/913/getDoc/en/lrcon.hlp/a002299816.htm" target="_blank"&gt;http://support.sas.com/onlinedoc/913/getDoc/en/lrcon.hlp/a002299816.htm&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
That should help</description>
      <pubDate>Thu, 23 Aug 2007 15:13:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Developers/sas-array-dynamic-name/m-p/4288#M1930</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-08-23T15:13:59Z</dc:date>
    </item>
  </channel>
</rss>

