<?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: duplicate the rows based on count in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/duplicate-the-rows-based-on-count/m-p/692122#M210775</link>
    <description>&lt;P&gt;Thank you I tried below code and it worked&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
do i = 1 to count;
output;
end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 16 Oct 2020 13:12:05 GMT</pubDate>
    <dc:creator>Jagadishkatam</dc:creator>
    <dc:date>2020-10-16T13:12:05Z</dc:date>
    <item>
      <title>duplicate the rows based on count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-the-rows-based-on-count/m-p/692119#M210772</link>
      <description>&lt;P&gt;Dear All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have the input as below where I want to duplicate the rows based on the count, like if I have the count 4 then i want to duplicate that 3 more time, if I have 3 then i want duplicate the rows 2 more times. Appreciate your response.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input count name$;
cards;
4 sample1
3 sample2
4 sample3
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;CODE class=" language-sas"&gt;data&amp;nbsp;want;&lt;BR /&gt;&lt;BR /&gt;4&amp;nbsp;sample1&lt;BR /&gt;4&amp;nbsp;sample1&lt;BR /&gt;4&amp;nbsp;sample1&lt;BR /&gt;4&amp;nbsp;sample1&lt;BR /&gt;3&amp;nbsp;sample2&lt;BR /&gt;3&amp;nbsp;sample2&lt;BR /&gt;3&amp;nbsp;sample2&lt;BR /&gt;4&amp;nbsp;sample3&lt;BR /&gt;4&amp;nbsp;sample3&lt;BR /&gt;4&amp;nbsp;sample3&lt;BR /&gt;4&amp;nbsp;sample3&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 13:09:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-the-rows-based-on-count/m-p/692119#M210772</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-10-16T13:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate the rows based on count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-the-rows-based-on-count/m-p/692121#M210774</link>
      <description>&lt;P&gt;Try a do loop with an explicit output statement.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Oct 2020 13:09:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-the-rows-based-on-count/m-p/692121#M210774</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2020-10-16T13:09:20Z</dc:date>
    </item>
    <item>
      <title>Re: duplicate the rows based on count</title>
      <link>https://communities.sas.com/t5/SAS-Programming/duplicate-the-rows-based-on-count/m-p/692122#M210775</link>
      <description>&lt;P&gt;Thank you I tried below code and it worked&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
set have;
do i = 1 to count;
output;
end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 16 Oct 2020 13:12:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/duplicate-the-rows-based-on-count/m-p/692122#M210775</guid>
      <dc:creator>Jagadishkatam</dc:creator>
      <dc:date>2020-10-16T13:12:05Z</dc:date>
    </item>
  </channel>
</rss>

