<?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: Moving Forward &amp;amp; Back in a Data Set in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Moving-Forward-amp-Back-in-a-Data-Set/m-p/708602#M37915</link>
    <description>&lt;P&gt;Let's use SASHELP.CARS.&amp;nbsp; Here I'm assigning (incorrectly) the MSRP of the even observations to the odd observation above, outputting only the odd observations, after alteration.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  do i=1 to nob by 2; drop i;
    set SASHELP.CARS point=i nobs=nob; /*i is odd*/
    j=i+1; drop j;
    set SASHELP.CARS (keep=MSRP)  point=j ; /*j is even*/
    output;
  end;
  stop;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Dec 2020 18:18:04 GMT</pubDate>
    <dc:creator>PhilC</dc:creator>
    <dc:date>2020-12-29T18:18:04Z</dc:date>
    <item>
      <title>Moving Forward &amp; Back in a Data Set</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Moving-Forward-amp-Back-in-a-Data-Set/m-p/708594#M37914</link>
      <description>&lt;P&gt;I have a data set shown here in this screen shot. I need to move through the data set, skip to the even obs, grab the value in Rows, then move back to the previous obs and assign the Rows value I just picked to a column named Count.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So for the first, BpmnObject, move to next Obs (2) and grab Rows - 103 then move back previous Obs (1) and assign rows to Count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my result set would look like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;RCT_Object_Type&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Count&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;BpmnObject&lt;/TD&gt;&lt;TD&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Miscellaneos&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Application&lt;/TD&gt;&lt;TD&gt;3216&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JeffreyLowe_0-1609260362094.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53081iF784E79660432A62/image-size/large?v=v2&amp;amp;px=999" role="button" title="JeffreyLowe_0-1609260362094.png" alt="JeffreyLowe_0-1609260362094.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 17:01:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Moving-Forward-amp-Back-in-a-Data-Set/m-p/708594#M37914</guid>
      <dc:creator>JeffreyLowe</dc:creator>
      <dc:date>2020-12-29T17:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Forward &amp; Back in a Data Set</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Moving-Forward-amp-Back-in-a-Data-Set/m-p/708602#M37915</link>
      <description>&lt;P&gt;Let's use SASHELP.CARS.&amp;nbsp; Here I'm assigning (incorrectly) the MSRP of the even observations to the odd observation above, outputting only the odd observations, after alteration.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  do i=1 to nob by 2; drop i;
    set SASHELP.CARS point=i nobs=nob; /*i is odd*/
    j=i+1; drop j;
    set SASHELP.CARS (keep=MSRP)  point=j ; /*j is even*/
    output;
  end;
  stop;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 18:18:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Moving-Forward-amp-Back-in-a-Data-Set/m-p/708602#M37915</guid>
      <dc:creator>PhilC</dc:creator>
      <dc:date>2020-12-29T18:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Forward &amp; Back in a Data Set</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Moving-Forward-amp-Back-in-a-Data-Set/m-p/708609#M37916</link>
      <description>&lt;P&gt;Much easier to carry values forward then moving them backwards.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have ;
  if mod(_n_,2)=1 then lagRCT_Object_Type=RCT_Object_Type;
  else output;
  retain lagRCT_Object_Type;
  keep lagRCT_Object_Type Count ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Dec 2020 17:56:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Moving-Forward-amp-Back-in-a-Data-Set/m-p/708609#M37916</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2020-12-29T17:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Forward &amp; Back in a Data Set</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Moving-Forward-amp-Back-in-a-Data-Set/m-p/708618#M37917</link>
      <description>&lt;P&gt;Thank you for the quick response! works like a charm! Really appreciate the help.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 18:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Moving-Forward-amp-Back-in-a-Data-Set/m-p/708618#M37917</guid>
      <dc:creator>JeffreyLowe</dc:creator>
      <dc:date>2020-12-29T18:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Moving Forward &amp; Back in a Data Set</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Moving-Forward-amp-Back-in-a-Data-Set/m-p/708619#M37918</link>
      <description>&lt;P&gt;Thank you Tom for the quick response! I really appreciate the help.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Dec 2020 18:24:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Moving-Forward-amp-Back-in-a-Data-Set/m-p/708619#M37918</guid>
      <dc:creator>JeffreyLowe</dc:creator>
      <dc:date>2020-12-29T18:24:42Z</dc:date>
    </item>
  </channel>
</rss>

