<?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 this greater than or less than  &amp;lt;&amp;gt; in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179779#M45868</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I need help with an if statement&lt;/P&gt;&lt;P&gt;tables is as follows &lt;/P&gt;&lt;P&gt;ID.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amt.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Results&lt;/P&gt;&lt;P&gt;A1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 120.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 119.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P&gt;a2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 125.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 130.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P&gt;a3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 126.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 126.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iif sum =. Then results. "Notcompleted";&lt;/P&gt;&lt;P&gt;if sum &amp;gt;1&amp;nbsp; and amt&amp;nbsp; ne sum = "A";&lt;/P&gt;&lt;P&gt;if order =. And plus money =&amp;gt; 1 then&amp;nbsp; sum= "e";&lt;/P&gt;&lt;P&gt;else sum ="c"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the issue I'm having is the if statement for A some number greater than 0 has to be in Sum an a number has to be I. amt to do comparison of &amp;lt;&amp;gt; the 2 if statements work thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 28 Aug 2014 21:52:33 GMT</pubDate>
    <dc:creator>BETO</dc:creator>
    <dc:date>2014-08-28T21:52:33Z</dc:date>
    <item>
      <title>If this greater than or less than  &lt;&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179779#M45868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I need help with an if statement&lt;/P&gt;&lt;P&gt;tables is as follows &lt;/P&gt;&lt;P&gt;ID.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amt.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Results&lt;/P&gt;&lt;P&gt;A1.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 120.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 119.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P&gt;a2.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 125.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 130.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P&gt;a3.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 126.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 126.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;iif sum =. Then results. "Notcompleted";&lt;/P&gt;&lt;P&gt;if sum &amp;gt;1&amp;nbsp; and amt&amp;nbsp; ne sum = "A";&lt;/P&gt;&lt;P&gt;if order =. And plus money =&amp;gt; 1 then&amp;nbsp; sum= "e";&lt;/P&gt;&lt;P&gt;else sum ="c"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the issue I'm having is the if statement for A some number greater than 0 has to be in Sum an a number has to be I. amt to do comparison of &amp;lt;&amp;gt; the 2 if statements work thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 21:52:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179779#M45868</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2014-08-28T21:52:33Z</dc:date>
    </item>
    <item>
      <title>Re: If this greater than or less than  &lt;&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179780#M45869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;iif sum =. Then results. "Notcompleted";&lt;/P&gt;&lt;P&gt;if sum &amp;gt;1&amp;nbsp; and amt&amp;nbsp; ne sum = "A";&lt;/P&gt;&lt;P&gt;if order =. And plus money =&amp;gt; 1 then&amp;nbsp; sum= "e";&lt;/P&gt;&lt;P&gt;else sum ="c"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;None of this code is syntactically correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If sum = . then Results='Notcompleted';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sum&amp;gt;1 and amt ne sum then Results='A'; /* assuming you want to assign to the previously mentioned variable*/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if order =. And plus money =&amp;gt; 1 then&amp;nbsp; sum= "e";&lt;/P&gt;&lt;P&gt;I have no idea what the above statement is supposed to mean. Sum cannot be 'e' as the comparisons above make it appear that sum is a number. Same for the &lt;STRONG&gt;else sum="c"&lt;/STRONG&gt; .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 22:04:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179780#M45869</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-08-28T22:04:28Z</dc:date>
    </item>
    <item>
      <title>Re: If this greater than or less than  &lt;&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179781#M45870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the actual question here?&amp;nbsp; From the subject perhaps you are just confused about SAS operators? &lt;/P&gt;&lt;P&gt;In normal SAS statements like IF the &amp;lt;&amp;gt; operator is the binary MAXimum operator.&amp;nbsp; So 4 &amp;lt;&amp;gt; 5 would result in 5 since 5 is greater than 4.&lt;/P&gt;&lt;P&gt;If you want a not equal operator you can use ^= or NE .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 22:57:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179781#M45870</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-08-28T22:57:46Z</dc:date>
    </item>
    <item>
      <title>Re: If this greater than or less than  &lt;&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179782#M45871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry i provided data that confuse my question.&lt;/P&gt;&lt;P&gt;my table&lt;/P&gt;&lt;P&gt;sUm&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Amt.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Results&lt;/P&gt;&lt;P&gt;124.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 125.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P&gt;145.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 130.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/P&gt;&lt;P&gt;my attempt is to determine if "sum "is greater or lesser than than "amt ".. If it is than its A ....if it's not the other if statements that I have will proceed...The one giving me issue is greater and lesser&lt;/P&gt;&lt;P&gt;thanks again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 28 Aug 2014 23:11:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179782#M45871</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2014-08-28T23:11:40Z</dc:date>
    </item>
    <item>
      <title>Re: If this greater than or less than  &lt;&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179783#M45872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What do you mean by "&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;greater or lesser than&lt;/SPAN&gt;"? It can't be both at once.&lt;/P&gt;&lt;P&gt;If we ignore missing values then you test for all three possible relationships with code like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sum &amp;gt; amt then results='A';&lt;/P&gt;&lt;P&gt;else if sum &amp;lt; amt then results='A';&lt;/P&gt;&lt;P&gt;else results='B';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which is more clearly/easily written as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if sum = amt then results='B';&lt;/P&gt;&lt;P&gt;else results='A';&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 02:36:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179783#M45872</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-08-29T02:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: If this greater than or less than  &lt;&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179784#M45873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Tom ,&lt;/P&gt;&lt;P&gt;thanks for for the quick response&amp;nbsp; I actually have&amp;nbsp; 4 if statement to take into consideration every possibly&amp;nbsp; for example &lt;/P&gt;&lt;P&gt;sum=. That gives me Results =notcompleted&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;order=. But plus$ is &amp;gt; 1. than results = wrong type&lt;/P&gt;&lt;P&gt;fOr A option to work the tech had to put something in sum and he had to put something in Amt if they are equal than it was completed if I use Not equal it will use In the results " wrong type" because sum is the sum of order and Plus$... &lt;/P&gt;&lt;P&gt;so I need to look at the sum to see if its greater or less than Amt ...I hope that makes sense &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 04:31:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179784#M45873</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2014-08-29T04:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: If this greater than or less than  &lt;&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179785#M45874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The expression "greater or less than" still has no meaning in English.&lt;/P&gt;&lt;P&gt;As to the other conditions then you need to be a little clearer about what conditions take precedence.&amp;nbsp; You also need to construct your IF/THEN/ELSE conditions so that clearly reflect what you want. In your original pseudo code example you had three independent IF statements. In that case it could be possible for the first to be true and set one value into the RESULTS variable and then one of the other expressions to also be true and cause the value to be over written.&amp;nbsp; The original code also seemed to want to make changes to more than one variable.&amp;nbsp; Is that what you want?&amp;nbsp; If want to change two different variables then you will need to two separate sets IF/THEN/ELSE logic trees.&amp;nbsp; Also if looks like you might want to change the value of one of the variables SUM that is used in the logic for setting RESULTS variable.&amp;nbsp; If so then you need to be clear about which value of SUM should be used in the calculate of RESULTS.&amp;nbsp; You also seem to have referenced a variable that is not show in the sample data.&amp;nbsp; What do you mean by PLUS$ or "plus money"? Note that neither form is valid as a variable name.&amp;nbsp; You also need to consider other cases.&amp;nbsp; What happens when SUM is not missing but less than 1?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One way to test is to construct example data that is representative of every possible combination and make sure the logic works for those.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; have ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;input&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; id $ sum amt expected $ ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;cards&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;a1 120 119 A&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;a2 125 130 A&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;a3 126 126 C&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;a4&amp;nbsp;&amp;nbsp; . 100 N&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;a5 100&amp;nbsp;&amp;nbsp; . E&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;a6&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; . ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt;a7&amp;nbsp;&amp;nbsp; 0 0&amp;nbsp; ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: #FFFFC0;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;data&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; want ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; have;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;select&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; ;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (sum=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; and amt &amp;gt; &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;) result=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'N'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (amt=&lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;.&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; and sum &amp;gt; &lt;/SPAN&gt;&lt;STRONG style="color: teal; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;1&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;) result=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'E'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (sum = amt) result=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'C'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;when&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; (sum &amp;lt; amt or sum &amp;gt; amt) result=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'A'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;otherwise&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt; result=&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: purple; background: white;"&gt;'U'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&amp;nbsp; &lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: blue; background: white;"&gt;end&lt;/SPAN&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;proc&lt;/STRONG&gt; &lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;print&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;STRONG style="color: navy; background: white; font-size: 10.0pt; font-family: 'Courier New';"&gt;run&lt;/STRONG&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New'; color: black; background: white;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;id sum&amp;nbsp;&amp;nbsp;&amp;nbsp; amt&amp;nbsp;&amp;nbsp;&amp;nbsp; expected result&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; line-height: 1.5em;"&gt;a1 120&amp;nbsp;&amp;nbsp;&amp;nbsp; 119&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;a2 125&amp;nbsp;&amp;nbsp;&amp;nbsp; 130&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; A&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;a3 126&amp;nbsp;&amp;nbsp;&amp;nbsp; 126&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;a4&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; N&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;a5 100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; E&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; E&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;a6&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; line-height: 1.5em;"&gt;a7&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10.0pt; font-family: 'Courier New';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 11:14:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179785#M45874</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2014-08-29T11:14:19Z</dc:date>
    </item>
    <item>
      <title>Re: If this greater than or less than  &lt;&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179786#M45875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;"Greater than or less than" MAY be treatable as "Not Equal" perhaps in this situation. Is that the intent?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 15:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179786#M45875</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2014-08-29T15:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: If this greater than or less than  &lt;&gt;</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179787#M45876</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Tom, I was not aware of the&amp;nbsp; When statement I used your example an tweak it to make it work for me and it did again thank you &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Aug 2014 19:46:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-this-greater-than-or-less-than-lt-gt/m-p/179787#M45876</guid>
      <dc:creator>BETO</dc:creator>
      <dc:date>2014-08-29T19:46:49Z</dc:date>
    </item>
  </channel>
</rss>

