<?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 how to keep only the last column in the dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/how-to-keep-only-the-last-column-in-the-dataset/m-p/39010#M7892</link>
    <description>is there a shortcut to keep only the last column in the dataset?&lt;BR /&gt;
&lt;BR /&gt;
for instance, keep last_column&lt;BR /&gt;
&lt;BR /&gt;
Thanks,</description>
    <pubDate>Mon, 28 Mar 2011 14:10:36 GMT</pubDate>
    <dc:creator>jdk123</dc:creator>
    <dc:date>2011-03-28T14:10:36Z</dc:date>
    <item>
      <title>how to keep only the last column in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-keep-only-the-last-column-in-the-dataset/m-p/39010#M7892</link>
      <description>is there a shortcut to keep only the last column in the dataset?&lt;BR /&gt;
&lt;BR /&gt;
for instance, keep last_column&lt;BR /&gt;
&lt;BR /&gt;
Thanks,</description>
      <pubDate>Mon, 28 Mar 2011 14:10:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-keep-only-the-last-column-in-the-dataset/m-p/39010#M7892</guid>
      <dc:creator>jdk123</dc:creator>
      <dc:date>2011-03-28T14:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: how to keep only the last column in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/how-to-keep-only-the-last-column-in-the-dataset/m-p/39011#M7893</link>
      <description>If we assume that means the variable with the largest value of VARNUM then...&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
42   proc sql;&lt;BR /&gt;
43      select name into :lastName separated by ' '&lt;BR /&gt;
44         from dictionary.columns&lt;BR /&gt;
45         where libname='SASHELP' and memname='CLASS'&lt;BR /&gt;
46         having varnum eq max(varnum)&lt;BR /&gt;
47         ;&lt;BR /&gt;
NOTE: The query requires remerging summary statistics back with the original data.&lt;BR /&gt;
48      quit;&lt;BR /&gt;
NOTE: PROCEDURE SQL used (Total process time):&lt;BR /&gt;
      real time           0.03 seconds&lt;BR /&gt;
      cpu time            0.03 seconds&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
49      run;&lt;BR /&gt;
50   %put NOTE: LastName=&amp;amp;lastname;&lt;BR /&gt;
NOTE: LastName=Weight&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Use LASTNAME in a KEEP data set opion.</description>
      <pubDate>Mon, 28 Mar 2011 14:34:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/how-to-keep-only-the-last-column-in-the-dataset/m-p/39011#M7893</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2011-03-28T14:34:45Z</dc:date>
    </item>
  </channel>
</rss>

