<?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-order SAS variables in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/re-order-SAS-variables/m-p/4693#M392</link>
    <description>where you use SAS/FSP FSView windows to review data, you can use the formula command to retrieve a previously stored customized layout, which will have retained your preferred column order and formats. Once opened, the formula will be updated with any new customization (including "the current columns in view") as the window is closed. A formula can be created by issuing command "save formula".&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Viewtable layout customization can be saved.&lt;/B&gt; A poster to SAS-L shared his technique --- his method uses SAS/AF processes he created. I can use his processes without requiring SAS/AF to be licensed.  &lt;BR /&gt;
&lt;BR /&gt;
Both these methods of working with previously stored layout customization can be integrated with the SAS Explorer ~ becoming the default behaviour or just optional.&lt;BR /&gt;
&lt;BR /&gt;
I particularly like being able to customize the "form view" that SAS/FSP, FSbrowse windows allow. Again, it is the customization available through SAS Explorer, that makes re-use of these form layouts, so extremely convenient.&lt;BR /&gt;
&lt;BR /&gt;
Peter C</description>
    <pubDate>Sat, 13 Oct 2007 10:05:40 GMT</pubDate>
    <dc:creator>Peter_C</dc:creator>
    <dc:date>2007-10-13T10:05:40Z</dc:date>
    <item>
      <title>re-order SAS variables</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/re-order-SAS-variables/m-p/4688#M387</link>
      <description>In one SAS dataset, there's 3 variavbles, v1, v2, v3. Now I want to re-order these to v3, v2, v1.&lt;BR /&gt;
&lt;BR /&gt;
One solution in DATA STEP is;&lt;BR /&gt;
&lt;BR /&gt;
******************;&lt;BR /&gt;
data test2;&lt;BR /&gt;
retain v3 v2 v1;&lt;BR /&gt;
set test;&lt;BR /&gt;
******************;&lt;BR /&gt;
&lt;BR /&gt;
But if retain statement has &amp;gt; 960 characters? SAS prompts an error message saying it can't process more than 960 char. Any solution to that? &lt;BR /&gt;
&lt;BR /&gt;
Or I have to separate RETAIN statement into &amp;gt;=2 lines instead?&lt;BR /&gt;
Or there's an ultimate way to do that &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
Thanks!&lt;BR /&gt;
David</description>
      <pubDate>Thu, 13 Sep 2007 02:33:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/re-order-SAS-variables/m-p/4688#M387</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-09-13T02:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: re-order SAS variables</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/re-order-SAS-variables/m-p/4689#M388</link>
      <description>It seems you are running into this issue:&lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/unotes/SN/010/010199.html" target="_blank"&gt;http://support.sas.com/techsup/unotes/SN/010/010199.html&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
SAS ignores white space in your statements, so this statement on 3 separate lines:&lt;BR /&gt;
[pre]&lt;BR /&gt;
retain v3&lt;BR /&gt;
       v2&lt;BR /&gt;
       v1;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 Would be the equivalent of &lt;BR /&gt;
[pre]&lt;BR /&gt;
retain v3 v2 v1;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Thu, 13 Sep 2007 06:33:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/re-order-SAS-variables/m-p/4689#M388</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-09-13T06:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: re-order SAS variables</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/re-order-SAS-variables/m-p/4690#M389</link>
      <description>The other alternative (and the one I prefer) is to use PROC SQL.&lt;BR /&gt;
&lt;BR /&gt;
PROC SQL;&lt;BR /&gt;
  CREATE TABLE xxx AS&lt;BR /&gt;
    SELECT v3, v2, v1&lt;BR /&gt;
    FROM xxx;&lt;BR /&gt;
QUIT;</description>
      <pubDate>Mon, 24 Sep 2007 13:50:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/re-order-SAS-variables/m-p/4690#M389</guid>
      <dc:creator>LawrenceHW</dc:creator>
      <dc:date>2007-09-24T13:50:19Z</dc:date>
    </item>
    <item>
      <title>Re: re-order SAS variables</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/re-order-SAS-variables/m-p/4691#M390</link>
      <description>True. But in retrospect, I really don't understand the need to reorder the variables in the existing dataset. &lt;BR /&gt;
&lt;BR /&gt;
Most reporting procedures give you a way to control the order on the report row and when you initially read the data INTO SAS form, your LENGTH statement or the order of the variables on your INPUT statement will get the variables in "order".  &lt;BR /&gt;
&lt;BR /&gt;
But I suppose if you have a boatload of variables and just want to use the default procedures without using a VAR or COLUMN statement than any of these methods is OK -- as described in these references:&lt;BR /&gt;
&lt;A href="http://support.sas.com/techsup/unotes/SN/008/008395.html" target="_blank"&gt;http://support.sas.com/techsup/unotes/SN/008/008395.html&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://paulchoate61.googlepages.com/DPR-Choate.pdf" target="_blank"&gt;http://paulchoate61.googlepages.com/DPR-Choate.pdf&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://www8.sas.com/scholars/05/PREVIOUS/2001_200.4/2004_MOR/Proceed/_2002/Posters/PS12.pdf" target="_blank"&gt;http://www8.sas.com/scholars/05/PREVIOUS/2001_200.4/2004_MOR/Proceed/_2002/Posters/PS12.pdf&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Mon, 24 Sep 2007 18:30:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/re-order-SAS-variables/m-p/4691#M390</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2007-09-24T18:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: re-order SAS variables</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/re-order-SAS-variables/m-p/4692#M391</link>
      <description>It's probably to do with a customer requirement. Many of our clients have a variable order preference so that when someone is browsing the data set (either FSV or Viewtable) then the key variables (i.e. subject ID) are always to the left of the screen. Makes it much easier than having to manually shift the variables around.</description>
      <pubDate>Thu, 27 Sep 2007 14:10:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/re-order-SAS-variables/m-p/4692#M391</guid>
      <dc:creator>LawrenceHW</dc:creator>
      <dc:date>2007-09-27T14:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: re-order SAS variables</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/re-order-SAS-variables/m-p/4693#M392</link>
      <description>where you use SAS/FSP FSView windows to review data, you can use the formula command to retrieve a previously stored customized layout, which will have retained your preferred column order and formats. Once opened, the formula will be updated with any new customization (including "the current columns in view") as the window is closed. A formula can be created by issuing command "save formula".&lt;BR /&gt;
&lt;BR /&gt;
&lt;B&gt;Viewtable layout customization can be saved.&lt;/B&gt; A poster to SAS-L shared his technique --- his method uses SAS/AF processes he created. I can use his processes without requiring SAS/AF to be licensed.  &lt;BR /&gt;
&lt;BR /&gt;
Both these methods of working with previously stored layout customization can be integrated with the SAS Explorer ~ becoming the default behaviour or just optional.&lt;BR /&gt;
&lt;BR /&gt;
I particularly like being able to customize the "form view" that SAS/FSP, FSbrowse windows allow. Again, it is the customization available through SAS Explorer, that makes re-use of these form layouts, so extremely convenient.&lt;BR /&gt;
&lt;BR /&gt;
Peter C</description>
      <pubDate>Sat, 13 Oct 2007 10:05:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/re-order-SAS-variables/m-p/4693#M392</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2007-10-13T10:05:40Z</dc:date>
    </item>
  </channel>
</rss>

