<?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-THEN Loop in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/IF-THEN-Loop/m-p/49934#M13553</link>
    <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I use the code as -&lt;BR /&gt;
&lt;BR /&gt;
data Week; &lt;BR /&gt;
	set Day;&lt;BR /&gt;
		IF ("1/01/2001"&amp;lt;=Date&amp;lt;="7/01/2001") then 'Week'= 'Week1';&lt;BR /&gt;
			IF ("8/01/2001"&amp;lt;=Date&amp;lt;="14/01/2001") then 'Week' = 'Week2';&lt;BR /&gt;
				IF ("15/01/2001"&amp;lt;=Date&amp;lt;="21/01/2001") then 'Week' = 'Week3';&lt;BR /&gt;
		ELSE IF ("22/01/2001"&amp;lt;=Date_of_Sale&amp;lt;="28/01/2001")then 'Week' = 'Week4';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
The date is character in the code .&lt;BR /&gt;
&lt;BR /&gt;
LOG ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Kindly suggest where am wrong or any articles that deal with this coding...&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Mark</description>
    <pubDate>Thu, 15 Jul 2010 04:09:15 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-07-15T04:09:15Z</dc:date>
    <item>
      <title>IF-THEN Loop</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/IF-THEN-Loop/m-p/49934#M13553</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
I use the code as -&lt;BR /&gt;
&lt;BR /&gt;
data Week; &lt;BR /&gt;
	set Day;&lt;BR /&gt;
		IF ("1/01/2001"&amp;lt;=Date&amp;lt;="7/01/2001") then 'Week'= 'Week1';&lt;BR /&gt;
			IF ("8/01/2001"&amp;lt;=Date&amp;lt;="14/01/2001") then 'Week' = 'Week2';&lt;BR /&gt;
				IF ("15/01/2001"&amp;lt;=Date&amp;lt;="21/01/2001") then 'Week' = 'Week3';&lt;BR /&gt;
		ELSE IF ("22/01/2001"&amp;lt;=Date_of_Sale&amp;lt;="28/01/2001")then 'Week' = 'Week4';&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
The date is character in the code .&lt;BR /&gt;
&lt;BR /&gt;
LOG ERROR 180-322: Statement is not valid or it is used out of proper order.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Kindly suggest where am wrong or any articles that deal with this coding...&lt;BR /&gt;
&lt;BR /&gt;
Regards,&lt;BR /&gt;
Mark</description>
      <pubDate>Thu, 15 Jul 2010 04:09:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/IF-THEN-Loop/m-p/49934#M13553</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-07-15T04:09:15Z</dc:date>
    </item>
  </channel>
</rss>

