<?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: Re-Arrange Variables in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Re-Arrange-Variables/m-p/148245#M39211</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the &lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm#p1hgqgmxm3dpqcn1d4w5za5qbz0d.htm"&gt;LENGTH&lt;/A&gt; statement within your data set. It's the best way to arrange your variables/columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Ahmed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Nov 2013 12:11:33 GMT</pubDate>
    <dc:creator>AhmedAl_Attar</dc:creator>
    <dc:date>2013-11-19T12:11:33Z</dc:date>
    <item>
      <title>Re-Arrange Variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Re-Arrange-Variables/m-p/148244#M39210</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After Many operation i have a dataset with variable in diff order.&lt;/P&gt;&lt;P&gt;I want to re-arrange order of Variable in dataset.&lt;/P&gt;&lt;P&gt;Can we Do it....&lt;/P&gt;&lt;P&gt;Example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NAME AGE SEX (Current order )&lt;/P&gt;&lt;P&gt;NAME SEX AGE(Desired Order)&lt;/P&gt;&lt;P&gt;* i want to change in my dataset not in output or result.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 11:41:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Re-Arrange-Variables/m-p/148244#M39210</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2013-11-19T11:41:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re-Arrange Variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Re-Arrange-Variables/m-p/148245#M39211</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Use the &lt;A href="http://support.sas.com/documentation/cdl/en/lestmtsref/63323/HTML/default/viewer.htm#p1hgqgmxm3dpqcn1d4w5za5qbz0d.htm"&gt;LENGTH&lt;/A&gt; statement within your data set. It's the best way to arrange your variables/columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Ahmed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 12:11:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Re-Arrange-Variables/m-p/148245#M39211</guid>
      <dc:creator>AhmedAl_Attar</dc:creator>
      <dc:date>2013-11-19T12:11:33Z</dc:date>
    </item>
    <item>
      <title>Re: Re-Arrange Variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Re-Arrange-Variables/m-p/148246#M39212</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are many ways to reorder variables in a dataset (a simple Google search will give you these), the important thing to note is that you need to replace the existing dataset (i.e. you can't just change the descriptor portion in something like PROC DATASETS).&lt;/P&gt;&lt;P&gt;My favourite method is to use the RETAIN statement before you read in the data, this way you don't need to know any of the variable attributes (type, length etc), just the names).&lt;/P&gt;&lt;P&gt;Here is an example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data class;&lt;/P&gt;&lt;P&gt;retain sex age height weight name;&lt;/P&gt;&lt;P&gt;set sashelp.class;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 12:35:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Re-Arrange-Variables/m-p/148246#M39212</guid>
      <dc:creator>Keith</dc:creator>
      <dc:date>2013-11-19T12:35:08Z</dc:date>
    </item>
    <item>
      <title>Re: Re-Arrange Variables</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Re-Arrange-Variables/m-p/148247#M39213</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.... it works in nice way........&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Nov 2013 12:59:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Re-Arrange-Variables/m-p/148247#M39213</guid>
      <dc:creator>Aman4SAS</dc:creator>
      <dc:date>2013-11-19T12:59:57Z</dc:date>
    </item>
  </channel>
</rss>

