<?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: DO Loop in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/DO-Loop/m-p/65311#M18631</link>
    <description>Unsure what you want to achieve, but rather then an output statement, maybe you want to add a &lt;BR /&gt;
[pre]put _ALL_;[/pre]&lt;BR /&gt;
statement before run; ?</description>
    <pubDate>Mon, 24 Jan 2011 03:23:37 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2011-01-24T03:23:37Z</dc:date>
    <item>
      <title>DO Loop</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/DO-Loop/m-p/65309#M18629</link>
      <description>Hi All,&lt;BR /&gt;
&lt;BR /&gt;
Kindly could anyone suggest how do we get to the output as below using the codesn 1. and 2. :&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
1.&lt;BR /&gt;
&lt;BR /&gt;
data invest (drop =i);&lt;BR /&gt;
do i=1 to 3;&lt;BR /&gt;
capital+2000;&lt;BR /&gt;
capital+capital*.1;&lt;BR /&gt;
end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Output is: Capital=7282&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
2.&lt;BR /&gt;
&lt;BR /&gt;
data invest (drop =year);&lt;BR /&gt;
	do year=1 to 3;&lt;BR /&gt;
		capital+2000;&lt;BR /&gt;
		do month=1 to 3;&lt;BR /&gt;
		Interest=capital*(0.075/12);&lt;BR /&gt;
		end;&lt;BR /&gt;
	end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Output : Capital=6000, Month=4, Interest=37.5&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Kind Regards,&lt;BR /&gt;
Kriti</description>
      <pubDate>Sun, 23 Jan 2011 14:13:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/DO-Loop/m-p/65309#M18629</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-01-23T14:13:38Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/DO-Loop/m-p/65310#M18630</link>
      <description>You need to add an explicit OUTPUT statement inside your DO/END loop.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.&lt;BR /&gt;
&lt;BR /&gt;
Suggested Google advanced search argument, this topic / post:&lt;BR /&gt;
&lt;BR /&gt;
data step do loop output site:sas.com</description>
      <pubDate>Sun, 23 Jan 2011 14:20:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/DO-Loop/m-p/65310#M18630</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-01-23T14:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: DO Loop</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/DO-Loop/m-p/65311#M18631</link>
      <description>Unsure what you want to achieve, but rather then an output statement, maybe you want to add a &lt;BR /&gt;
[pre]put _ALL_;[/pre]&lt;BR /&gt;
statement before run; ?</description>
      <pubDate>Mon, 24 Jan 2011 03:23:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/DO-Loop/m-p/65311#M18631</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2011-01-24T03:23:37Z</dc:date>
    </item>
  </channel>
</rss>

