<?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: Inserting sequential similar records in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Inserting-sequential-similar-records/m-p/400254#M97025</link>
    <description>&lt;P&gt;Can't see any data (don't have SAS available at mo), so maybe something like:&lt;/P&gt;
&lt;PRE&gt;data have;
  year=2010; var1="A"; var2=12; output;
  year=2011; var1="B"; var2=45; output;
run;

data want (drop=i);
  set have;
  do i=0 to 9;
    year=year+i;
    output;
  end;
run;&lt;/PRE&gt;</description>
    <pubDate>Mon, 02 Oct 2017 13:50:52 GMT</pubDate>
    <dc:creator>RW9</dc:creator>
    <dc:date>2017-10-02T13:50:52Z</dc:date>
    <item>
      <title>Inserting sequential similar records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Inserting-sequential-similar-records/m-p/400246#M97024</link>
      <description>&lt;P&gt;I’m trying to create a table that has future years.&amp;nbsp; For example with sashelp.orsales2, I’d like to insert 10 rows per with the same values as the orginal record but with a new column yearFuture that increments by 1 per year e.g. 1999, 2000, 2001… I can see one way to do this as creating a new table with the year column and joining it back to the current table.&amp;nbsp; I do not know the sas syntax for creating the loop for the years in a SAS program.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 13:20:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Inserting-sequential-similar-records/m-p/400246#M97024</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2017-10-02T13:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting sequential similar records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Inserting-sequential-similar-records/m-p/400254#M97025</link>
      <description>&lt;P&gt;Can't see any data (don't have SAS available at mo), so maybe something like:&lt;/P&gt;
&lt;PRE&gt;data have;
  year=2010; var1="A"; var2=12; output;
  year=2011; var1="B"; var2=45; output;
run;

data want (drop=i);
  set have;
  do i=0 to 9;
    year=year+i;
    output;
  end;
run;&lt;/PRE&gt;</description>
      <pubDate>Mon, 02 Oct 2017 13:50:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Inserting-sequential-similar-records/m-p/400254#M97025</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-10-02T13:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: Inserting sequential similar records</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Inserting-sequential-similar-records/m-p/400256#M97026</link>
      <description>&lt;P&gt;Thanks RW9, this method is very efficient.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 13:52:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Inserting-sequential-similar-records/m-p/400256#M97026</guid>
      <dc:creator>DavidPhillips2</dc:creator>
      <dc:date>2017-10-02T13:52:05Z</dc:date>
    </item>
  </channel>
</rss>

