<?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: Position of the variables in the order that I want in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Position-of-the-variables-in-the-order-that-I-want/m-p/302532#M64182</link>
    <description>&lt;P&gt;I used the term "empty" format statement as that does not override the attributes of variables coming from datasets, if those need to be preserved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And yes, any "variable-ordering" statement has to come first in the data step. Doing it after the set (eg) means that the original order in the contributing datasets will take precedence. It's just how the data step compiler creates the PDV while scanning the data step code.&lt;/P&gt;</description>
    <pubDate>Wed, 05 Oct 2016 08:20:16 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2016-10-05T08:20:16Z</dc:date>
    <item>
      <title>Position of the variables in the order that I want</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Position-of-the-variables-in-the-order-that-I-want/m-p/302421#M64156</link>
      <description>&lt;P&gt;&lt;SPAN&gt;How &lt;/SPAN&gt;&lt;SPAN&gt;can&lt;/SPAN&gt; I &lt;SPAN&gt;put&lt;/SPAN&gt; &lt;SPAN&gt;variables&lt;/SPAN&gt; &lt;SPAN&gt;in the positions&lt;/SPAN&gt; &lt;SPAN&gt;I require&lt;/SPAN&gt; &lt;SPAN&gt;using&lt;/SPAN&gt; SAS &lt;SPAN&gt;code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;when&lt;/SPAN&gt; &lt;SPAN&gt;I use a&lt;/SPAN&gt; &lt;SPAN&gt;merge,&lt;/SPAN&gt; &lt;SPAN&gt;variables&lt;/SPAN&gt; &lt;SPAN&gt;are positioned by&lt;/SPAN&gt; &lt;SPAN&gt;default&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In the&lt;/SPAN&gt; &lt;SPAN&gt;dataset&lt;/SPAN&gt; &lt;SPAN&gt;I can&lt;/SPAN&gt; &lt;SPAN&gt;move columns&lt;/SPAN&gt; &lt;SPAN&gt;/&lt;/SPAN&gt; &lt;SPAN&gt;variables&lt;/SPAN&gt; &lt;SPAN&gt;and&lt;/SPAN&gt; &lt;SPAN&gt;change them&lt;/SPAN&gt; &lt;SPAN&gt;posicision,&lt;/SPAN&gt; &lt;SPAN&gt;but&lt;/SPAN&gt; &lt;SPAN&gt;how to do it&lt;/SPAN&gt; directly &lt;SPAN&gt;by&lt;/SPAN&gt; &lt;SPAN&gt;code?&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 18:01:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Position-of-the-variables-in-the-order-that-I-want/m-p/302421#M64156</guid>
      <dc:creator>Angel_Saenz</dc:creator>
      <dc:date>2016-10-04T18:01:24Z</dc:date>
    </item>
    <item>
      <title>Re: Position of the variables in the order that I want</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Position-of-the-variables-in-the-order-that-I-want/m-p/302422#M64157</link>
      <description>&lt;P&gt;you can do it by:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; retain &amp;nbsp;... variable names in desired order ...;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; ... your code ...&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2016 18:04:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Position-of-the-variables-in-the-order-that-I-want/m-p/302422#M64157</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-10-04T18:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Position of the variables in the order that I want</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Position-of-the-variables-in-the-order-that-I-want/m-p/302520#M64179</link>
      <description>&lt;P&gt;An "empty" &lt;FONT face="courier new,courier"&gt;format&lt;/FONT&gt; statement also works (only variable names, but no formats). Consider this if you want to prevent the main effect that &lt;FONT face="courier new,courier"&gt;retain&lt;/FONT&gt; has on variables that are not supplied by the contributing datasets.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 06:16:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Position-of-the-variables-in-the-order-that-I-want/m-p/302520#M64179</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-10-05T06:16:34Z</dc:date>
    </item>
    <item>
      <title>Re: Position of the variables in the order that I want</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Position-of-the-variables-in-the-order-that-I-want/m-p/302529#M64181</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser﻿&lt;/a&gt;&amp;nbsp;you are right, I have tested it &lt;STRONG&gt;without&lt;/STRONG&gt; and &lt;STRONG&gt;with&lt;/STRONG&gt; a given format after the variables list&lt;/P&gt;&lt;P&gt;and it worked fine in both cases.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It worked &lt;STRONG&gt;only&lt;/STRONG&gt; if the format statement was &lt;STRONG&gt;before &lt;/STRONG&gt;the set:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;format x1-x5 &amp;nbsp;&lt;STRONG&gt;3.&lt;/STRONG&gt; ;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;set have;&lt;/P&gt;&lt;P&gt;run;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 07:53:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Position-of-the-variables-in-the-order-that-I-want/m-p/302529#M64181</guid>
      <dc:creator>Shmuel</dc:creator>
      <dc:date>2016-10-05T07:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Position of the variables in the order that I want</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Position-of-the-variables-in-the-order-that-I-want/m-p/302532#M64182</link>
      <description>&lt;P&gt;I used the term "empty" format statement as that does not override the attributes of variables coming from datasets, if those need to be preserved.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And yes, any "variable-ordering" statement has to come first in the data step. Doing it after the set (eg) means that the original order in the contributing datasets will take precedence. It's just how the data step compiler creates the PDV while scanning the data step code.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Oct 2016 08:20:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Position-of-the-variables-in-the-order-that-I-want/m-p/302532#M64182</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2016-10-05T08:20:16Z</dc:date>
    </item>
  </channel>
</rss>

