<?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: Reorder SAS variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/329643#M73791</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data reorder;
   if 0 then set have(drop=x_:);
   set have;
   run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 02 Feb 2017 23:18:13 GMT</pubDate>
    <dc:creator>data_null__</dc:creator>
    <dc:date>2017-02-02T23:18:13Z</dc:date>
    <item>
      <title>Reorder SAS variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/329639#M73788</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;
&lt;P&gt;I have a data file like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;/P&gt;
&lt;P&gt;input var x_1 x_3 x_bac x_1dnx b ;&lt;/P&gt;
&lt;P&gt;datalines;&lt;/P&gt;
&lt;P&gt;0 1 1 1 1 0&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to put all X_ to the end, since there are hundred of X_ variable and they follow no rule other than the prefix of X_, is there any way to do it quicky?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2017 23:12:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/329639#M73788</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-02-02T23:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder SAS variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/329643#M73791</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data reorder;
   if 0 then set have(drop=x_:);
   set have;
   run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 02 Feb 2017 23:18:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/329643#M73791</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2017-02-02T23:18:13Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder SAS variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/329705#M73825</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;&amp;nbsp;very cool solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to understand, when we use the if 0 trick, we make sure that whatever follows is only done in compilation right?&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 07:38:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/329705#M73825</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-02-03T07:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder SAS variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/329754#M73829</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/31304"&gt;@PeterClemmensen&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15410"&gt;@data_null__&lt;/a&gt;&amp;nbsp;very cool solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Just to understand, when we use the if 0 trick, we make sure that whatever follows is only done in compilation right?&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Correct.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2017 12:10:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/329754#M73829</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2017-02-03T12:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder SAS variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/330334#M74074</link>
      <description>Hi Data_null_,&lt;BR /&gt;Interesting indeed!&lt;BR /&gt;But what does the "if 0" do to the code?&lt;BR /&gt;Thank you,&lt;BR /&gt;HHC&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Feb 2017 22:11:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/330334#M74074</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-02-06T22:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder SAS variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/330479#M74149</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/49486"&gt;@hhchenfx&lt;/a&gt; wrote:&lt;BR /&gt;Hi Data_null_,&lt;BR /&gt;Interesting indeed!&lt;BR /&gt;But what does the "if 0" do to the code?&lt;BR /&gt;Thank you,&lt;BR /&gt;HHC&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#p1d61passkeqo0n1jdn023ykd0g5.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/lrcon/65287/HTML/default/viewer.htm#p1d61passkeqo0n1jdn023ykd0g5.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is an expression that is FALSE preventing the SET statement from being executed.&amp;nbsp; The SET statement is compiled which places&amp;nbsp;variables in the PDV in the desired order.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 14:46:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/330479#M74149</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2017-02-07T14:46:07Z</dc:date>
    </item>
    <item>
      <title>Re: Reorder SAS variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/330504#M74161</link>
      <description>&lt;P&gt;Thank you for your help!&lt;/P&gt;
&lt;P&gt;HHC&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2017 15:59:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Reorder-SAS-variables/m-p/330504#M74161</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2017-02-07T15:59:45Z</dc:date>
    </item>
  </channel>
</rss>

