<?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: retrieve one row before end in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/retrieve-one-row-before-end/m-p/549094#M152319</link>
    <description>&lt;P&gt;Like this, you read only one record of the set:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data junk;
point = max(1, nobs - 1);
set sashelp.class point=point nobs=nobs;
output; stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sun, 07 Apr 2019 04:23:14 GMT</pubDate>
    <dc:creator>PGStats</dc:creator>
    <dc:date>2019-04-07T04:23:14Z</dc:date>
    <item>
      <title>retrieve one row before end</title>
      <link>https://communities.sas.com/t5/SAS-Programming/retrieve-one-row-before-end/m-p/549088#M152317</link>
      <description>&lt;P&gt;Hello friends&lt;/P&gt;
&lt;P&gt;I want to ask please what is the best way to&amp;nbsp; retrieve one row before end.&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;P&gt;I want to&amp;nbsp;retrieve the row with mon=1901 (because it is one row before the end)&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data tbl1;
informat start date9. end date9.;
format start date9. end date9.;
input mon start end;
cards;
1812 '21DEC2018'd '21Jan2019'd
1901 '22Jan2019'd '21Feb2019'd
1902 '22Feb2019'd '21Mar2019'd
;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 07 Apr 2019 04:00:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/retrieve-one-row-before-end/m-p/549088#M152317</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-04-07T04:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve one row before end</title>
      <link>https://communities.sas.com/t5/SAS-Programming/retrieve-one-row-before-end/m-p/549091#M152318</link>
      <description>&lt;P&gt;I found the solution&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Data tbl1;
informat start date9. end date9.;
format start date9. end date9.;
input mon start end;
cards;
1812 '21DEC2018'd '21Jan2019'd
1901 '22Jan2019'd '21Feb2019'd
1902 '22Feb2019'd '21Mar2019'd
;
run;



data tbl2;
set tbl1 nobs=nobs;
if _n_ =nobs-1 then keep=1;
if keep ne 1 then delete;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 07 Apr 2019 04:18:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/retrieve-one-row-before-end/m-p/549091#M152318</guid>
      <dc:creator>Ronein</dc:creator>
      <dc:date>2019-04-07T04:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: retrieve one row before end</title>
      <link>https://communities.sas.com/t5/SAS-Programming/retrieve-one-row-before-end/m-p/549094#M152319</link>
      <description>&lt;P&gt;Like this, you read only one record of the set:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data junk;
point = max(1, nobs - 1);
set sashelp.class point=point nobs=nobs;
output; stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Apr 2019 04:23:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/retrieve-one-row-before-end/m-p/549094#M152319</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-04-07T04:23:14Z</dc:date>
    </item>
  </channel>
</rss>

