<?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: Reading the last record of a large table in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reading-the-last-record-of-a-large-table/m-p/293426#M61068</link>
    <description>&lt;P&gt;Two "why's":&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;why both SQL&amp;nbsp;and data step?&lt;/LI&gt;
&lt;LI&gt;Why do you want to add this value to all rows (the requirement...)?&lt;/LI&gt;
&lt;/OL&gt;</description>
    <pubDate>Tue, 23 Aug 2016 13:41:21 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2016-08-23T13:41:21Z</dc:date>
    <item>
      <title>Reading the last record of a large table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-the-last-record-of-a-large-table/m-p/293156#M60940</link>
      <description>&lt;P&gt;I would like to populate the last record of a variable as a new variable&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Input&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sno Closing Price&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10.5&lt;/P&gt;&lt;P&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10.2&lt;/P&gt;&lt;P&gt;4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10.4&lt;/P&gt;&lt;P&gt;5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10.6&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sno Closing Price &amp;nbsp; New_Closing Price&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10.6&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 10.5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;SPAN&gt;10.6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;3 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10.2 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;10.6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10.4 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;10.6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;10.6 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;10.6&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to obtain this output using both a datastep as well as a proc sql if possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you much in advance.&lt;/P&gt;</description>
      <pubDate>Mon, 22 Aug 2016 15:00:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-the-last-record-of-a-large-table/m-p/293156#M60940</guid>
      <dc:creator>sivakarthik</dc:creator>
      <dc:date>2016-08-22T15:00:19Z</dc:date>
    </item>
    <item>
      <title>Re: Reading the last record of a large table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-the-last-record-of-a-large-table/m-p/293161#M60941</link>
      <description>&lt;P&gt;Here is one way,&lt;/P&gt;
&lt;PRE style="width: 534px; height: 31px;"&gt;&lt;CODE class=" language-sas"&gt;&amp;nbsp;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
	input Sno Closing_Price;
	cards;
1        10
2         10.5
3          10.2
4          10.4
5          10.6
;
run;

data want;
	if _n_=1 then
			set have (rename=closing_price=new_closing keep=Closing_Price) nobs=nobs point=nobs;
			
	set have;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 22 Aug 2016 15:17:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-the-last-record-of-a-large-table/m-p/293161#M60941</guid>
      <dc:creator>Haikuo</dc:creator>
      <dc:date>2016-08-22T15:17:29Z</dc:date>
    </item>
    <item>
      <title>Re: Reading the last record of a large table</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reading-the-last-record-of-a-large-table/m-p/293426#M61068</link>
      <description>&lt;P&gt;Two "why's":&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;why both SQL&amp;nbsp;and data step?&lt;/LI&gt;
&lt;LI&gt;Why do you want to add this value to all rows (the requirement...)?&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Tue, 23 Aug 2016 13:41:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reading-the-last-record-of-a-large-table/m-p/293426#M61068</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-08-23T13:41:21Z</dc:date>
    </item>
  </channel>
</rss>

