<?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: Can we use descending function in data step ? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Can-we-use-descending-function-in-data-step/m-p/426192#M281257</link>
    <description>&lt;P&gt;AFAIK, there is no descending() function in SAS, but there is a &lt;EM&gt;descending&lt;/EM&gt; option for the by statement:&amp;nbsp;&lt;A href="http://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=p0yeyftk8ftuckn1o5qzy53284gz.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=p0yeyftk8ftuckn1o5qzy53284gz.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 09 Jan 2018 18:16:45 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2018-01-09T18:16:45Z</dc:date>
    <item>
      <title>Can we use descending function in data step ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-use-descending-function-in-data-step/m-p/426190#M281256</link>
      <description />
      <pubDate>Tue, 09 Jan 2018 18:11:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-use-descending-function-in-data-step/m-p/426190#M281256</guid>
      <dc:creator>ajay_mishra</dc:creator>
      <dc:date>2018-01-09T18:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use descending function in data step ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-use-descending-function-in-data-step/m-p/426192#M281257</link>
      <description>&lt;P&gt;AFAIK, there is no descending() function in SAS, but there is a &lt;EM&gt;descending&lt;/EM&gt; option for the by statement:&amp;nbsp;&lt;A href="http://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=p0yeyftk8ftuckn1o5qzy53284gz.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en" target="_blank"&gt;http://documentation.sas.com/?docsetId=lestmtsref&amp;amp;docsetTarget=p0yeyftk8ftuckn1o5qzy53284gz.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 18:16:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-use-descending-function-in-data-step/m-p/426192#M281257</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2018-01-09T18:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use descending function in data step ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-use-descending-function-in-data-step/m-p/426196#M281258</link>
      <description>&lt;P&gt;If you mean to read a dataset in reverse order, backwards from the end, here is one way:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ssalc;
set sashelp.class(obs=1) nobs=nobs;
do i = nobs to 1 by -1;
    set sashelp.class point=i;
    output;
    end;
drop i;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 09 Jan 2018 18:41:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-use-descending-function-in-data-step/m-p/426196#M281258</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-01-09T18:41:31Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use descending function in data step ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-use-descending-function-in-data-step/m-p/426219#M281259</link>
      <description>&lt;P&gt;Since NOBS=NOBS is taken care of at compile time,&amp;nbsp;here is an alternative to&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;&amp;nbsp;code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data ssalc(drop=i);
   do i = nobs to 1 by -1;
      set sashelp.class point=i nobs=nobs;
      output;
   end;
   stop;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 20:51:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-use-descending-function-in-data-step/m-p/426219#M281259</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2018-01-09T20:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use descending function in data step ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-use-descending-function-in-data-step/m-p/426233#M281260</link>
      <description>&lt;P&gt;Test it! I did.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It will work because it will hit the obs=1 limit after the first iteration. It's just another way to avoid an infinite loop.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 20:47:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-use-descending-function-in-data-step/m-p/426233#M281260</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-01-09T20:47:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can we use descending function in data step ?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Can-we-use-descending-function-in-data-step/m-p/426234#M281261</link>
      <description>&lt;P&gt;Sorry&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/462"&gt;@PGStats&lt;/a&gt;, I stand corrected.&amp;nbsp; I will update that post.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2018 20:50:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Can-we-use-descending-function-in-data-step/m-p/426234#M281261</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2018-01-09T20:50:08Z</dc:date>
    </item>
  </channel>
</rss>

