<?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: Repeat the value till the number given in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624086#M183776</link>
    <description>&lt;P&gt;Without posting any sample data (in usable form) answering question is almost always guesswork. From your initial post i would have answered the very same that &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt; did. If you want to duplicate observations, you have to use the output-statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  if x = 'rajesh' then output;
  output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 12 Feb 2020 06:13:11 GMT</pubDate>
    <dc:creator>andreas_lds</dc:creator>
    <dc:date>2020-02-12T06:13:11Z</dc:date>
    <item>
      <title>Repeat the value till the number given</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624059#M183765</link>
      <description>How to write a program to repeat a value if x=rajesh for 2 timesthen it has to present as rajesh rajesh</description>
      <pubDate>Wed, 12 Feb 2020 01:06:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624059#M183765</guid>
      <dc:creator>Rajeshganta</dc:creator>
      <dc:date>2020-02-12T01:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Repeat the value till the number given</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624065#M183766</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/311722"&gt;@Rajeshganta&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;How to write a program to repeat a value if x=rajesh for 2 timesthen it has to present as rajesh rajesh&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data sample;
  have='rajesh';
  want=repeat(trim(have)||' ',1);
  output;
run;

proc print data=sample;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Feb 2020 01:34:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624065#M183766</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2020-02-12T01:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Repeat the value till the number given</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624085#M183775</link>
      <description>Thank you for the solution but i am getting as rajesh rajesh but i want as rajesh&lt;BR /&gt;Rajesh in different rows can you please suggest me</description>
      <pubDate>Wed, 12 Feb 2020 06:00:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624085#M183775</guid>
      <dc:creator>Rajeshganta</dc:creator>
      <dc:date>2020-02-12T06:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Repeat the value till the number given</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624086#M183776</link>
      <description>&lt;P&gt;Without posting any sample data (in usable form) answering question is almost always guesswork. From your initial post i would have answered the very same that &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/12447"&gt;@Patrick&lt;/a&gt; did. If you want to duplicate observations, you have to use the output-statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  if x = 'rajesh' then output;
  output;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Feb 2020 06:13:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624086#M183776</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-02-12T06:13:11Z</dc:date>
    </item>
    <item>
      <title>Re: Repeat the value till the number given</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624144#M183807</link>
      <description>As per my requirement i want name mentioned in nunber of times in different cells as, if i want rajesh as 2 times&lt;BR /&gt;Rajesh&lt;BR /&gt;Rajesh</description>
      <pubDate>Wed, 12 Feb 2020 11:14:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624144#M183807</guid>
      <dc:creator>Rajeshganta</dc:creator>
      <dc:date>2020-02-12T11:14:49Z</dc:date>
    </item>
    <item>
      <title>Re: Repeat the value till the number given</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624147#M183809</link>
      <description>&lt;P&gt;Please give an example of your input dataset and what the output should look like.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this answer your question ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input name $ times;
cards;
Rajesh 2
Howard 3
;
run;

data want;
set have;
do i=1 to times;
output;
end;

keep name;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Feb 2020 12:22:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624147#M183809</guid>
      <dc:creator>gamotte</dc:creator>
      <dc:date>2020-02-12T12:22:15Z</dc:date>
    </item>
    <item>
      <title>Re: Repeat the value till the number given</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624385#M183929</link>
      <description>Thank you it solved my requirement</description>
      <pubDate>Thu, 13 Feb 2020 00:45:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624385#M183929</guid>
      <dc:creator>Rajeshganta</dc:creator>
      <dc:date>2020-02-13T00:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: Repeat the value till the number given</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624416#M183949</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/311722"&gt;@Rajeshganta&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thank you it solved my requirement&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Then please set the most helpful post as solution.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Feb 2020 06:03:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Repeat-the-value-till-the-number-given/m-p/624416#M183949</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2020-02-13T06:03:55Z</dc:date>
    </item>
  </channel>
</rss>

