<?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: Move a certain column to the end/beginning without knowing the rest of columns in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-a-certain-column-to-the-end-beginning-without-knowing-the/m-p/345227#M22845</link>
    <description>&lt;P&gt;Use the KEEP= and/or DROP= dataset options.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one ;
  set have (drop=Total);
  set have ;
run;

data two;
  set have (keep=Total);
  set have ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 29 Mar 2017 02:23:29 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2017-03-29T02:23:29Z</dc:date>
    <item>
      <title>Move a certain column to the end/beginning without knowing the rest of columns</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-a-certain-column-to-the-end-beginning-without-knowing-the/m-p/345221#M22844</link>
      <description>&lt;P&gt;&lt;STRONG&gt;Original&amp;nbsp;dataset&lt;/STRONG&gt;:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Type Class ... Total ... Category&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;1. Need to &lt;U&gt;move the column 'Total' to the end&lt;/U&gt; without changing the order for the rest of columns.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;The result&lt;/STRONG&gt; looks like:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Type Class ... Category Total&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;2. Need to &lt;U&gt;move the column 'Total' to the beginning&lt;/U&gt;&amp;nbsp;without changing the order for the rest of columns.&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Total Type Class ... Category&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Requirements&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;Hard-coding like&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;retain ColA ColB ... ColZ Total;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;wouldn't work because we wouldn't know the names for the rest of the columns or how many columns there are (they are dynamic).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Mar 2017 02:11:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-a-certain-column-to-the-end-beginning-without-knowing-the/m-p/345221#M22844</guid>
      <dc:creator>ayin</dc:creator>
      <dc:date>2017-03-29T02:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: Move a certain column to the end/beginning without knowing the rest of columns</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-a-certain-column-to-the-end-beginning-without-knowing-the/m-p/345227#M22845</link>
      <description>&lt;P&gt;Use the KEEP= and/or DROP= dataset options.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one ;
  set have (drop=Total);
  set have ;
run;

data two;
  set have (keep=Total);
  set have ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Mar 2017 02:23:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-a-certain-column-to-the-end-beginning-without-knowing-the/m-p/345227#M22845</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2017-03-29T02:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Move a certain column to the end/beginning without knowing the rest of columns</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-a-certain-column-to-the-end-beginning-without-knowing-the/m-p/345231#M22846</link>
      <description>That's super smart! Thank you.</description>
      <pubDate>Wed, 29 Mar 2017 02:33:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Move-a-certain-column-to-the-end-beginning-without-knowing-the/m-p/345231#M22846</guid>
      <dc:creator>ayin</dc:creator>
      <dc:date>2017-03-29T02:33:32Z</dc:date>
    </item>
  </channel>
</rss>

