<?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, combine, unknown code datasets observations in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-combine-unknown-code-datasets-observations/m-p/492328#M129356</link>
    <description>&lt;P&gt;It is doing the opposite of LAG().&amp;nbsp; It is creating a variable that will have the value of a variable from the NEXT observation.&lt;/P&gt;
&lt;P&gt;But it is probably using the wrong dataset.&amp;nbsp; It should be using the same dataset as in the first SET statement.&lt;/P&gt;</description>
    <pubDate>Tue, 04 Sep 2018 15:01:16 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2018-09-04T15:01:16Z</dc:date>
    <item>
      <title>sas, combine, unknown code datasets observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-combine-unknown-code-datasets-observations/m-p/492282#M129345</link>
      <description>&lt;P&gt;I need help reading the below code. I am not sure what specific parts in this code are doing. For example, what does ( firstobs = 2 keep = DPD_CLOSE_OF_BUSINESS_DT rename = (DPD_CLOSE_OF_BUSINESS_DT = Next_COB_DT) ) do?&lt;BR /&gt;Also, what does ( obs = 1 drop = _all_ ); do? I have also not used Prev_COB_DT = ifn( first.SOR_LEASE_NBR, (.), lag(DPD_CLOSE_OF_BUSINESS_DT) ); before, what does this do? I am reading someone elses code, I wish I could provide more detail. If I find a solution, I will post it. Thanks for your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;STRONG&gt;&lt;CODE class=" language-sas"&gt;    Removed&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 26 Apr 2019 15:46:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-combine-unknown-code-datasets-observations/m-p/492282#M129345</guid>
      <dc:creator>user112a2</dc:creator>
      <dc:date>2019-04-26T15:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: sas, combine, unknown code datasets observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-combine-unknown-code-datasets-observations/m-p/492309#M129352</link>
      <description>&lt;P&gt;A set statement like this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;set
  LETNOTRG.REQ_1_3_03 (
    firstobs = 2
    keep = DPD_CLOSE_OF_BUSINESS_DT
    rename = (DPD_CLOSE_OF_BUSINESS_DT = Next_COB_DT)
  )
  LETNOTRG.REQ_1_3_03 (
    obs = 1
    drop = _all_
  )
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;performs a "look-ahead" into the dataset by starting to read at observation 2, and preventing a premature eof by reading 1 observation without data (that's what the drop=_all_ does).&lt;/P&gt;
&lt;P&gt;What puzzles me is that it tries to read the same dataset that it is creating, so my guess is that this won't work.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 14:17:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-combine-unknown-code-datasets-observations/m-p/492309#M129352</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-09-04T14:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: sas, combine, unknown code datasets observations</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-combine-unknown-code-datasets-observations/m-p/492328#M129356</link>
      <description>&lt;P&gt;It is doing the opposite of LAG().&amp;nbsp; It is creating a variable that will have the value of a variable from the NEXT observation.&lt;/P&gt;
&lt;P&gt;But it is probably using the wrong dataset.&amp;nbsp; It should be using the same dataset as in the first SET statement.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 15:01:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-combine-unknown-code-datasets-observations/m-p/492328#M129356</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2018-09-04T15:01:16Z</dc:date>
    </item>
  </channel>
</rss>

