<?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 Dataset-New Column Position in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dataset-New-Column-Position/m-p/2178#M729</link>
    <description>Occasionally I need to add a column to a dataset.  The new column always becomes the first column.  How can I control it so the column is added after the last column.&lt;BR /&gt;
Ex:&lt;BR /&gt;
data rfa;&lt;BR /&gt;
  format b_flag ;&lt;BR /&gt;
  label b_flag                = 'Flag';&lt;BR /&gt;
  if (eFlag or cFlag) then b_flag = 1;&lt;BR /&gt;
  else b_flag=0;&lt;BR /&gt;
run;</description>
    <pubDate>Tue, 30 Jan 2007 17:08:04 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2007-01-30T17:08:04Z</dc:date>
    <item>
      <title>Dataset-New Column Position</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dataset-New-Column-Position/m-p/2178#M729</link>
      <description>Occasionally I need to add a column to a dataset.  The new column always becomes the first column.  How can I control it so the column is added after the last column.&lt;BR /&gt;
Ex:&lt;BR /&gt;
data rfa;&lt;BR /&gt;
  format b_flag ;&lt;BR /&gt;
  label b_flag                = 'Flag';&lt;BR /&gt;
  if (eFlag or cFlag) then b_flag = 1;&lt;BR /&gt;
  else b_flag=0;&lt;BR /&gt;
run;</description>
      <pubDate>Tue, 30 Jan 2007 17:08:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dataset-New-Column-Position/m-p/2178#M729</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2007-01-30T17:08:04Z</dc:date>
    </item>
    <item>
      <title>Re: Dataset-New Column Position</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dataset-New-Column-Position/m-p/2179#M730</link>
      <description>The trick is to type your first statement about your new variable (either FORMAT, LABEL or the variable's formula) AFTER the reading (SET or MERGE) statement ; then your variable is added at the far right of the dataset.&lt;BR /&gt;
If you type at least one of the statements mentionning the new variable before the reading statement, it will be created at the left of the dataset.&lt;BR /&gt;
&lt;BR /&gt;
Regards.&lt;BR /&gt;
Olivier</description>
      <pubDate>Thu, 01 Feb 2007 10:23:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Dataset-New-Column-Position/m-p/2179#M730</guid>
      <dc:creator>Olivier</dc:creator>
      <dc:date>2007-02-01T10:23:52Z</dc:date>
    </item>
  </channel>
</rss>

