<?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: Creating multiple rows per id variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Creating-multiple-rows-per-id-variable/m-p/820889#M324051</link>
    <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Wed, 29 Jun 2022 11:15:35 GMT</pubDate>
    <dc:creator>costasRO</dc:creator>
    <dc:date>2022-06-29T11:15:35Z</dc:date>
    <item>
      <title>Creating multiple rows per id variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-multiple-rows-per-id-variable/m-p/820884#M324049</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;I have a dataset that looks like this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ID Year&lt;/P&gt;
&lt;P&gt;A&amp;nbsp; &amp;nbsp;1990&lt;/P&gt;
&lt;P&gt;B&amp;nbsp; &amp;nbsp;1990&lt;/P&gt;
&lt;P&gt;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;
&lt;P&gt;Z&amp;nbsp; 1990&lt;/P&gt;
&lt;P&gt;A 1991&lt;/P&gt;
&lt;P&gt;B 1991&lt;/P&gt;
&lt;P&gt;etc&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to repeat each ID-Year row N times. So say N=2 the data i want to have should be like:&lt;/P&gt;
&lt;P&gt;ID Year&lt;/P&gt;
&lt;P&gt;A&amp;nbsp; &amp;nbsp;1990&lt;/P&gt;
&lt;P&gt;A 1990&lt;/P&gt;
&lt;P&gt;B&amp;nbsp; &amp;nbsp;1990&lt;/P&gt;
&lt;P&gt;B 1990&lt;/P&gt;
&lt;P&gt;.&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; .&lt;/P&gt;
&lt;P&gt;Z&amp;nbsp; 1990&lt;/P&gt;
&lt;P&gt;Z 1990&lt;/P&gt;
&lt;P&gt;A 1991&lt;/P&gt;
&lt;P&gt;A 1991&lt;/P&gt;
&lt;P&gt;B 1991&lt;/P&gt;
&lt;P&gt;B 1991&lt;/P&gt;
&lt;P&gt;etc&lt;/P&gt;
&lt;P&gt;Please also note that I actually need N to be a larger number, i only used 2 here to illustrate.&lt;/P&gt;
&lt;P&gt;many thanks&lt;/P&gt;
&lt;P&gt;Costas&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 10:32:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-multiple-rows-per-id-variable/m-p/820884#M324049</guid>
      <dc:creator>costasRO</dc:creator>
      <dc:date>2022-06-29T10:32:07Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple rows per id variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-multiple-rows-per-id-variable/m-p/820887#M324050</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID $ Year;
datalines;
A 1990 
B 1990 
Z 1990 
A 1991 
B 1991 
;

%let n = 2;

data want;
   set have;
   do _N_ = 1 to &amp;amp;n.;
      output;
   end;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 29 Jun 2022 10:41:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-multiple-rows-per-id-variable/m-p/820887#M324050</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2022-06-29T10:41:32Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple rows per id variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Creating-multiple-rows-per-id-variable/m-p/820889#M324051</link>
      <description>&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jun 2022 11:15:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Creating-multiple-rows-per-id-variable/m-p/820889#M324051</guid>
      <dc:creator>costasRO</dc:creator>
      <dc:date>2022-06-29T11:15:35Z</dc:date>
    </item>
  </channel>
</rss>

