<?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 referring to current row in do loop in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ARRAY-referring-to-current-row-in-do-loop/m-p/345474#M22858</link>
    <description>&lt;P&gt;Thank you !!&amp;nbsp;I could not figure out how to set it to generate the mean in the missing fields.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate&amp;nbsp;your help.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 29 Mar 2017 17:37:06 GMT</pubDate>
    <dc:creator>kvera40</dc:creator>
    <dc:date>2017-03-29T17:37:06Z</dc:date>
    <item>
      <title>ARRAY referring to current row in do loop</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ARRAY-referring-to-current-row-in-do-loop/m-p/344813#M22823</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am setting up an array with a do-loop.. I need to create a do-loop block that will replace a missing value of trip 1 trhough 5 with the mean of the first trips.. I cannot figure out how to set up the do-loop to command it to replace the missing value (.) with the mean of the first 5 trips.. Please help.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data tripinfo;&lt;BR /&gt;infile datalines truncover;&lt;BR /&gt;input custno trip1 trip2 trip3 trip4 trip5 trip6 trip7 trip8 trip9 trip10;&lt;/P&gt;&lt;P&gt;datalines;&lt;BR /&gt;123 200 225 432 300 100 550 80 325 600 270&lt;BR /&gt;124 2000 3000 2205 1400 1385 1240 1000&lt;BR /&gt;125 900 890 1000 1025 1200 1120 1000 800 750 300&lt;BR /&gt;126 3000 3000 3000 3000 3000&lt;BR /&gt;127 699 599&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2017 21:53:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ARRAY-referring-to-current-row-in-do-loop/m-p/344813#M22823</guid>
      <dc:creator>kvera40</dc:creator>
      <dc:date>2017-03-27T21:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: ARRAY referring to current row in do loop</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ARRAY-referring-to-current-row-in-do-loop/m-p/344836#M22826</link>
      <description>&lt;P&gt;Not sure if this is what you want, but . . .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data tripinfo (drop=mean);
  infile datalines truncover;
  input custno trip1 trip2 trip3 trip4 trip5 trip6 trip7 trip8 trip9 trip10;
  array means trip1-trip10;
  mean=mean(of trip1-trip5);
  do over means;
    if missing(means) then means=mean;
  end;
  datalines;
123 200 225 432 300 100 550 80 325 600 270
124 2000 3000 2205 1400 1385 1240 1000 . . .
125 900 890 1000 1025 1200 1120 1000 800 750 300
126 3000 3000 3000 3000 3000 . . . . .
127 699 599 . . . . . . . .
;
run;
&lt;/PRE&gt;
&lt;P&gt;Art, CEO, AnalystFinder.com&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Mar 2017 00:05:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ARRAY-referring-to-current-row-in-do-loop/m-p/344836#M22826</guid>
      <dc:creator>art297</dc:creator>
      <dc:date>2017-03-28T00:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: ARRAY referring to current row in do loop</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/ARRAY-referring-to-current-row-in-do-loop/m-p/345474#M22858</link>
      <description>&lt;P&gt;Thank you !!&amp;nbsp;I could not figure out how to set it to generate the mean in the missing fields.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really appreciate&amp;nbsp;your help.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 17:37:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/ARRAY-referring-to-current-row-in-do-loop/m-p/345474#M22858</guid>
      <dc:creator>kvera40</dc:creator>
      <dc:date>2017-03-29T17:37:06Z</dc:date>
    </item>
  </channel>
</rss>

