<?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: Array in a Do Loop in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Array-in-a-Do-Loop/m-p/545535#M150929</link>
    <description>Hi, dim(MEMBER) returns 12 as there are 12 elements in the array&lt;BR /&gt;&lt;BR /&gt;The do loop resolves to&lt;BR /&gt;Id=1 to 9&lt;BR /&gt;During the first iteration&lt;BR /&gt;Mem(id+1) resolves to membe[2] which is nothing but mem2 variable&lt;BR /&gt;Mem2=1/10 and this variable is written to the output dataset&lt;BR /&gt;&lt;BR /&gt;This step is iterated till member[9] which is mem9 variable according to the array&lt;BR /&gt;</description>
    <pubDate>Sat, 23 Mar 2019 23:15:56 GMT</pubDate>
    <dc:creator>justusjillella</dc:creator>
    <dc:date>2019-03-23T23:15:56Z</dc:date>
    <item>
      <title>Array in a Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-in-a-Do-Loop/m-p/545531#M150927</link>
      <description>&lt;P&gt;Can someone help me understand how the code is processing the output in the attached table?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data number;&lt;BR /&gt;array member[*] mem1-mem12;&lt;BR /&gt;mem1=10;&lt;BR /&gt;do id=1 to dim(member)-3;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; member[id+1]=id/member[id];&lt;BR /&gt;&amp;nbsp;&amp;nbsp; output;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; end;&lt;BR /&gt;run;&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;</description>
      <pubDate>Sat, 23 Mar 2019 22:24:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-in-a-Do-Loop/m-p/545531#M150927</guid>
      <dc:creator>Jodifer77</dc:creator>
      <dc:date>2019-03-23T22:24:37Z</dc:date>
    </item>
    <item>
      <title>Re: Array in a Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-in-a-Do-Loop/m-p/545535#M150929</link>
      <description>Hi, dim(MEMBER) returns 12 as there are 12 elements in the array&lt;BR /&gt;&lt;BR /&gt;The do loop resolves to&lt;BR /&gt;Id=1 to 9&lt;BR /&gt;During the first iteration&lt;BR /&gt;Mem(id+1) resolves to membe[2] which is nothing but mem2 variable&lt;BR /&gt;Mem2=1/10 and this variable is written to the output dataset&lt;BR /&gt;&lt;BR /&gt;This step is iterated till member[9] which is mem9 variable according to the array&lt;BR /&gt;</description>
      <pubDate>Sat, 23 Mar 2019 23:15:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-in-a-Do-Loop/m-p/545535#M150929</guid>
      <dc:creator>justusjillella</dc:creator>
      <dc:date>2019-03-23T23:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Array in a Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-in-a-Do-Loop/m-p/545536#M150930</link>
      <description>Give us somewhere to begin.&lt;BR /&gt;&lt;BR /&gt;Do you know what the DATA statement does?&lt;BR /&gt;&lt;BR /&gt;Do you know what the END statement does?&lt;BR /&gt;&lt;BR /&gt;Do you know what the OUTPUT statement does?&lt;BR /&gt;&lt;BR /&gt;Do you know what the ARRAY statement does?&lt;BR /&gt;&lt;BR /&gt;Have you printed and examined the results?</description>
      <pubDate>Sat, 23 Mar 2019 23:18:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-in-a-Do-Loop/m-p/545536#M150930</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2019-03-23T23:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Array in a Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-in-a-Do-Loop/m-p/545597#M150954</link>
      <description>&lt;P&gt;Thanks for the feedback!&amp;nbsp; I didn't understand where the denominator was coming from, but I think I do now.&amp;nbsp; The denominator is the result of the previous iteration's calculation, right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 24 Mar 2019 14:11:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-in-a-Do-Loop/m-p/545597#M150954</guid>
      <dc:creator>Jodifer77</dc:creator>
      <dc:date>2019-03-24T14:11:32Z</dc:date>
    </item>
    <item>
      <title>Re: Array in a Do Loop</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Array-in-a-Do-Loop/m-p/545598#M150955</link>
      <description>&lt;P&gt;Thanks for you time in responding.&amp;nbsp; It was my first question posted...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question was in the iterative do loop, I didn't know where the denominator for the member[id+1]=id/member[id] was coming from.&amp;nbsp; I was able to figure it out that it was the value calculated in the previous iteration.&amp;nbsp; I think I'm good to go.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sun, 24 Mar 2019 14:14:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Array-in-a-Do-Loop/m-p/545598#M150955</guid>
      <dc:creator>Jodifer77</dc:creator>
      <dc:date>2019-03-24T14:14:15Z</dc:date>
    </item>
  </channel>
</rss>

