<?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: short code to rearrange variables? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/short-code-to-rearrange-variables/m-p/680512#M205679</link>
    <description>&lt;P&gt;With 7,000 variables, I'm imagining that they are not necessarily named x1-x7000.&amp;nbsp; You can shortcut the code and move MONTH to the first position just using:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
retain month;
set have;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 31 Aug 2020 19:00:43 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2020-08-31T19:00:43Z</dc:date>
    <item>
      <title>short code to rearrange variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/short-code-to-rearrange-variables/m-p/680494#M205671</link>
      <description>&lt;P&gt;my data set has following variables&lt;/P&gt;
&lt;P&gt;x1 x2 x3 x4....x100 Month&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I rearrange so that the following happens:&lt;/P&gt;
&lt;P&gt;Month x1 x2 x3 x4....x100&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In other words I need to rearrange so that Month is the first column. But I don't want to have to write down all other&lt;/P&gt;
&lt;P&gt;100 variables (i actually have over 7,000 variables).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 17:38:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/short-code-to-rearrange-variables/m-p/680494#M205671</guid>
      <dc:creator>ubshams</dc:creator>
      <dc:date>2020-08-31T17:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: short code to rearrange variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/short-code-to-rearrange-variables/m-p/680498#M205674</link>
      <description>&lt;P&gt;Here is a reference that illustrates how to refer to variables and datasets in a short cut list:&lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/iml/2018/05/29/6-easy-ways-to-specify-a-list-of-variables-in-sas.html" target="_blank"&gt;https://blogs.sas.com/content/iml/2018/05/29/6-easy-ways-to-specify-a-list-of-variables-in-sas.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
retain month x1-x100;
set have;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/185449"&gt;@ubshams&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;my data set has following variables&lt;/P&gt;
&lt;P&gt;x1 x2 x3 x4....x100 Month&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How do I rearrange so that the following happens:&lt;/P&gt;
&lt;P&gt;Month x1 x2 x3 x4....x100&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In other words I need to rearrange so that Month is the first column. But I don't want to have to write down all other&lt;/P&gt;
&lt;P&gt;100 variables (i actually have over 7,000 variables).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks in advance!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2020 17:55:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/short-code-to-rearrange-variables/m-p/680498#M205674</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2020-08-31T17:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: short code to rearrange variables?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/short-code-to-rearrange-variables/m-p/680512#M205679</link>
      <description>&lt;P&gt;With 7,000 variables, I'm imagining that they are not necessarily named x1-x7000.&amp;nbsp; You can shortcut the code and move MONTH to the first position just using:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
retain month;
set have;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 31 Aug 2020 19:00:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/short-code-to-rearrange-variables/m-p/680512#M205679</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2020-08-31T19:00:43Z</dc:date>
    </item>
  </channel>
</rss>

