<?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: How can I duplicate the records by many times (Control by a variable)? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/How-can-I-duplicate-the-records-by-many-times-Control-by-a/m-p/67443#M19286</link>
    <description>You have the SAS OUTPUT statement which can be used in a DATA step for this purpose, as required.  Without explicit coding of the OUTPUT in your example, only one SAS observation is generated.  You can define a code paragraph using the construct below (coded within a DATA step):&lt;BR /&gt;
&lt;BR /&gt;
DO I=1 TO &lt;SOME_VALUE&gt;;  &lt;BR /&gt;
  OUTPUT;  &lt;BR /&gt;
END;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Recommended Google advanced search argument, this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
data step programming site:sas.com&lt;/SOME_VALUE&gt;</description>
    <pubDate>Fri, 12 Mar 2010 12:11:40 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2010-03-12T12:11:40Z</dc:date>
    <item>
      <title>How can I duplicate the records by many times (Control by a variable)?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-can-I-duplicate-the-records-by-many-times-Control-by-a/m-p/67442#M19285</link>
      <description>Dear all,&lt;BR /&gt;
&lt;BR /&gt;
How can I duplicate the records?&lt;BR /&gt;
&lt;BR /&gt;
For example:&lt;BR /&gt;
&lt;BR /&gt;
DATA TEST;&lt;BR /&gt;
  INFILE CARDS MISSOVER;&lt;BR /&gt;
  INPUT @1 ID4.  @8 Factor 2.  @13INVENCST COMMA10.2;&lt;BR /&gt;
  CARDS;&lt;BR /&gt;
0001    2   45,000.00&lt;BR /&gt;
0002    5   28,000.00&lt;BR /&gt;
;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
If the first record of factor is 2. How can I duplicate the record by 2 times?&lt;BR /&gt;
&lt;BR /&gt;
Finally, I want the results as following:&lt;BR /&gt;
&lt;BR /&gt;
0001   20   45,000.00&lt;BR /&gt;
0001   20   45,000.00&lt;BR /&gt;
0001   10   28,000.00&lt;BR /&gt;
0002   10   28,000.00&lt;BR /&gt;
0002   10   28,000.00&lt;BR /&gt;
0002   10   28,000.00&lt;BR /&gt;
0002   10   28,000.00&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks all&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: loverstar

Message was edited by: loverstar</description>
      <pubDate>Fri, 12 Mar 2010 03:23:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-can-I-duplicate-the-records-by-many-times-Control-by-a/m-p/67442#M19285</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-03-12T03:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: How can I duplicate the records by many times (Control by a variable)?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/How-can-I-duplicate-the-records-by-many-times-Control-by-a/m-p/67443#M19286</link>
      <description>You have the SAS OUTPUT statement which can be used in a DATA step for this purpose, as required.  Without explicit coding of the OUTPUT in your example, only one SAS observation is generated.  You can define a code paragraph using the construct below (coded within a DATA step):&lt;BR /&gt;
&lt;BR /&gt;
DO I=1 TO &lt;SOME_VALUE&gt;;  &lt;BR /&gt;
  OUTPUT;  &lt;BR /&gt;
END;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Recommended Google advanced search argument, this topic/post:&lt;BR /&gt;
&lt;BR /&gt;
data step programming site:sas.com&lt;/SOME_VALUE&gt;</description>
      <pubDate>Fri, 12 Mar 2010 12:11:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/How-can-I-duplicate-the-records-by-many-times-Control-by-a/m-p/67443#M19286</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-03-12T12:11:40Z</dc:date>
    </item>
  </channel>
</rss>

