<?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 IF - Loop in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/IF-Loop/m-p/47097#M12605</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I use the code below :&lt;BR /&gt;
&lt;BR /&gt;
data Margin;&lt;BR /&gt;
set CAT_SORT;&lt;BR /&gt;
	if Good = "A" THEN&lt;BR /&gt;
		Margin = 10*Unit;&lt;BR /&gt;
	if Good = "B" AND &lt;BR /&gt;
		"01/01/2001"&amp;lt;=Date&amp;lt;="31/01/2001" THEN&lt;BR /&gt;
		Margin = 20*Unit;&lt;BR /&gt;
	IF Good = "B" AND &lt;BR /&gt;
		"01/02/2002"&amp;lt;=Date&amp;lt;="28/02/2002" THEN&lt;BR /&gt;
		Margin = 30*Unit;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Is there a change that you could suugest so that I use Good="B" once only , tha is, use the IF only once.&lt;BR /&gt;
&lt;BR /&gt;
Kind Regards,&lt;BR /&gt;
Mark</description>
    <pubDate>Mon, 12 Jul 2010 03:59:38 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-07-12T03:59:38Z</dc:date>
    <item>
      <title>IF - Loop</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IF-Loop/m-p/47097#M12605</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I use the code below :&lt;BR /&gt;
&lt;BR /&gt;
data Margin;&lt;BR /&gt;
set CAT_SORT;&lt;BR /&gt;
	if Good = "A" THEN&lt;BR /&gt;
		Margin = 10*Unit;&lt;BR /&gt;
	if Good = "B" AND &lt;BR /&gt;
		"01/01/2001"&amp;lt;=Date&amp;lt;="31/01/2001" THEN&lt;BR /&gt;
		Margin = 20*Unit;&lt;BR /&gt;
	IF Good = "B" AND &lt;BR /&gt;
		"01/02/2002"&amp;lt;=Date&amp;lt;="28/02/2002" THEN&lt;BR /&gt;
		Margin = 30*Unit;&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Is there a change that you could suugest so that I use Good="B" once only , tha is, use the IF only once.&lt;BR /&gt;
&lt;BR /&gt;
Kind Regards,&lt;BR /&gt;
Mark</description>
      <pubDate>Mon, 12 Jul 2010 03:59:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IF-Loop/m-p/47097#M12605</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-12T03:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: IF - Loop</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IF-Loop/m-p/47098#M12606</link>
      <description>Your post may have been truncated, contributed by certain characters included.  Read the post below and then "EDIT" your own original post (there is an ICON when displaying your own posts about making a change/edit) to correct it with suitable controls and data.&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=27609" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=27609&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 12 Jul 2010 12:46:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IF-Loop/m-p/47098#M12606</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2010-07-12T12:46:46Z</dc:date>
    </item>
  </channel>
</rss>

