<?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: if then and else then in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59915#M16941</link>
    <description>Simplify your life with SELECT instead of IF THEN ELSE&lt;BR /&gt;
&lt;BR /&gt;
data new.newshoes;&lt;BR /&gt;
 set sashelp.shoes; &lt;BR /&gt;
 Select(PRODUCT);&lt;BR /&gt;
        When ("Boot")                NEWPRODUCT=1;&lt;BR /&gt;
        When ("Men's Casual")        NEWPRODUCT=2;&lt;BR /&gt;
        ..........&lt;BR /&gt;
        ..........&lt;BR /&gt;
        Otherwise;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: Gatineau1</description>
    <pubDate>Tue, 01 Feb 2011 18:07:24 GMT</pubDate>
    <dc:creator>Gatineau1</dc:creator>
    <dc:date>2011-02-01T18:07:24Z</dc:date>
    <item>
      <title>if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59895#M16921</link>
      <description>What is the benefit of using else then with specified ranges?&lt;BR /&gt;
data one;&lt;BR /&gt;
set two;&lt;BR /&gt;
if 8 gt age lt 10 then agecat=1;&lt;BR /&gt;
&lt;B&gt;else&lt;/B&gt; if 11 gt age lt 14 then agecat=2;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
Is there any benefit to adding "else" in the statement if you specify the range?&lt;BR /&gt;
&lt;BR /&gt;
I'm just doing some searching and wondering if it's a preference of serves a purpose</description>
      <pubDate>Thu, 06 Jan 2011 16:50:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59895#M16921</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2011-01-06T16:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59896#M16922</link>
      <description>Using IF-THEN statements without the ELSE statement causes SAS to evaluate all IF-THEN statements. &lt;BR /&gt;
&lt;BR /&gt;
Using IF-THEN statements with the ELSE statement causes SAS to execute IF-THEN statements until it encounters the first true statement. Subsequent IF-THEN statements are not evaluated.&lt;BR /&gt;
&lt;BR /&gt;
You may refer SAS Online Documentation for more details.</description>
      <pubDate>Thu, 06 Jan 2011 17:28:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59896#M16922</guid>
      <dc:creator>NickR</dc:creator>
      <dc:date>2011-01-06T17:28:57Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59897#M16923</link>
      <description>Maybe no benefits at all. See some of more recently published SAS code, for instance,  &lt;BR /&gt;
&lt;A href="http://support.sas.com/kb/33/017.html"&gt;KNOWLEDGE BASE / SAMPLES &amp;amp; SAS NOTES 33017&lt;/A&gt; -- It does not bother to use ELSE IF at all. It goes, in part, like:&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;data&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;new.newshoes;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;set&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;sashelp.shoes;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#008000;font-family:Courier New;font-size:10pt;"&gt;/*&amp;nbsp;the&amp;nbsp;original&amp;nbsp;data&amp;nbsp;set&amp;nbsp;*/&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;PRODUCT&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#800080;font-family:Courier New;font-size:10pt;"&gt;"Boot"&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;NEWPRODUCT=&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;1&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;PRODUCT&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#800080;font-family:Courier New;font-size:10pt;"&gt;"Men's&amp;nbsp;Casual"&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;NEWPRODUCT=&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;2&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;PRODUCT&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#800080;font-family:Courier New;font-size:10pt;"&gt;"Women's&amp;nbsp;Casual"&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;NEWPRODUCT=&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;3&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;PRODUCT&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#800080;font-family:Courier New;font-size:10pt;"&gt;"Men's&amp;nbsp;Dress"&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;NEWPRODUCT=&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;4&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;PRODUCT&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#800080;font-family:Courier New;font-size:10pt;"&gt;"Women's&amp;nbsp;Dress"&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;NEWPRODUCT=&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;5&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;PRODUCT&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#800080;font-family:Courier New;font-size:10pt;"&gt;"Sandal"&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;NEWPRODUCT=&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;6&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;PRODUCT&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#800080;font-family:Courier New;font-size:10pt;"&gt;"Slipper"&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;NEWPRODUCT=&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;7&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;PRODUCT&amp;nbsp;=&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#800080;font-family:Courier New;font-size:10pt;"&gt;"Sport&amp;nbsp;Shoe"&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;then&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;NEWPRODUCT=&lt;/SPAN&gt;&lt;B&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;8&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&amp;nbsp;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;SPAN style="color:#0000FF;font-family:Courier New;font-size:10pt;"&gt;format&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;&amp;nbsp;NEWPRODUCT&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color:#008080;font-family:Courier New;font-size:10pt;"&gt;productfmt.&lt;/SPAN&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;
&lt;P style="padding:0"&gt;&lt;B&gt;&lt;SPAN style="color:#000080;font-family:Courier New;font-size:10pt;"&gt;run&lt;/SPAN&gt;&lt;/B&gt;&lt;SPAN style="font-family:Courier New;font-size:10pt;"&gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Jan 2011 17:36:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59897#M16923</guid>
      <dc:creator>chang_y_chung_hotmail_com</dc:creator>
      <dc:date>2011-01-06T17:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59898#M16924</link>
      <description>What Nick R said.&lt;BR /&gt;
&lt;BR /&gt;
Small enough difference, but this doesn't do much of a comparison, probably more pronounced in character or other types of comparison. &lt;BR /&gt;
[pre]&lt;BR /&gt;
data ifelse;&lt;BR /&gt;
	do i=1 to 1000000;&lt;BR /&gt;
		x=rand('normal', 0,1);&lt;BR /&gt;
		if x&amp;gt;0 then y=1;&lt;BR /&gt;
		else if x&amp;lt;=0 and x&amp;gt;-0.5 then y=0;&lt;BR /&gt;
		else if x&amp;lt;=-0.5 then y=2;&lt;BR /&gt;
		output;&lt;BR /&gt;
	end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
data if;&lt;BR /&gt;
	do i=1 to 1000000;&lt;BR /&gt;
		x=rand('normal', 0,1);&lt;BR /&gt;
		if x&amp;gt;0 then y=1;&lt;BR /&gt;
		if x&amp;lt;=0 and x&amp;gt;-0.5 then y=0;&lt;BR /&gt;
		if x&amp;lt;=-0.5 then y=2;&lt;BR /&gt;
		output;&lt;BR /&gt;
	end;&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Message was edited by: Reeza

Message was edited by: Reeza</description>
      <pubDate>Thu, 06 Jan 2011 18:03:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59898#M16924</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2011-01-06T18:03:08Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59899#M16925</link>
      <description>I think there is no benefit in excluding the ELSE in that example.&lt;BR /&gt;
I prefer to avoid the IF as well as the ELSE for these situations.&lt;BR /&gt;
I would create a "user defined format" with PROC FORMAT and use a put function to derive that ageCat, something like&lt;BR /&gt;
&lt;BR /&gt;
ageCat = put( age, myFmt. );&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
creating that range-to-value format is simply:&lt;BR /&gt;
proc format;&lt;BR /&gt;
 value myFmt &lt;BR /&gt;
 8 - 10 = 1&lt;BR /&gt;
 11-14 = 2&lt;BR /&gt;
;&lt;BR /&gt;
run;&lt;BR /&gt;
 &lt;BR /&gt;
 &lt;BR /&gt;
of course the nuisance is that the put() returns a string only, but if the category really has to be a number, then&lt;BR /&gt;
ageCat = input( put( age, myFmt. ), best8. ) ;&lt;BR /&gt;
  &lt;BR /&gt;
Probably it is always worth using the user-format approach when there is only one outcome variable for a series of if-tests.&lt;BR /&gt;
 &lt;BR /&gt;
peterC</description>
      <pubDate>Thu, 06 Jan 2011 18:41:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59899#M16925</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-01-06T18:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59900#M16926</link>
      <description>If there is only one outcome variable for a series of if-tests, I also find&lt;BR /&gt;
[pre]&lt;BR /&gt;
data new.newshoes;&lt;BR /&gt;
  set sashelp.shoes; &lt;BR /&gt;
  NEWPRODUCT=ifn(PRODUCT = "Boot"          , 1&lt;BR /&gt;
            ,ifn(PRODUCT = "Men's Casual"  , 2&lt;BR /&gt;
            ,ifn(PRODUCT = "Women's Casual", 3&lt;BR /&gt;
            ,ifn(PRODUCT = "Men's Dress"   , 4&lt;BR /&gt;
            ,ifn(PRODUCT = "Women's Dress" , 5&lt;BR /&gt;
            ,ifn(PRODUCT = "Sandal"        , 6&lt;BR /&gt;
            ,ifn(PRODUCT = "Slipper"       , 7&lt;BR /&gt;
            ,ifn(PRODUCT = "Sport Shoe"    , 8&lt;BR /&gt;
            ,                                . ))))))));&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]&lt;BR /&gt;
more legible than if tests. Otherwise the select statement is also handy.</description>
      <pubDate>Mon, 10 Jan 2011 23:19:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59900#M16926</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2011-01-10T23:19:20Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59901#M16927</link>
      <description>Would the which() function help in that situation?</description>
      <pubDate>Mon, 10 Jan 2011 23:29:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59901#M16927</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-01-10T23:29:23Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59902#M16928</link>
      <description>Peter, in this case it would, but this is an example, values are random and don't matter here.&lt;BR /&gt;
&lt;P&gt;&lt;BR /&gt;
One thing: the embedded ifn() suite above would be a wee bit slower than a suite of if else statement as sas in their wisdom have chosen to &lt;B&gt;always evaluate all arguments&lt;/B&gt; of the ifn/ifc functions, even though by design some will never be used. I hope that one day C=ifn(B=0,.,A/B); will not generate a division by zero error when B=0. It shouldn't. &lt;BR /&gt;
&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;
&lt;BR /&gt;
Anyway, I am ready to trade the tiny performance hit for better code legibility.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2011 21:29:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59902#M16928</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2011-01-13T21:29:14Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59903#M16929</link>
      <description>&amp;gt; Peter, in this case it would, but this is an example, &lt;BR /&gt;
&amp;gt; values are random and don't matter here. &lt;BR /&gt;
 ?????&lt;BR /&gt;
 &lt;BR /&gt;
&amp;gt; One thing: the embedded ifn() suite above would be a&lt;BR /&gt;
&amp;gt; wee bit slower than a suite of if else statement &lt;BR /&gt;
&amp;gt; Anyway, I am ready to trade the tiny performance hit&lt;BR /&gt;
&amp;gt; for better code legibility.&lt;BR /&gt;
 &lt;BR /&gt;
Chris&lt;BR /&gt;
&lt;BR /&gt;
I thought the informat technique would provide the clearest code while being simplest to manage. &lt;BR /&gt;
Does it not also perform better than a series of logic tests on the same data (with/out ELSE)?&lt;BR /&gt;
&lt;BR /&gt;
peterC</description>
      <pubDate>Fri, 14 Jan 2011 13:41:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59903#M16929</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-01-14T13:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59904#M16930</link>
      <description>I would say that a SAS FORMAT look-up (using a PUT function, or sometimes when using a PROC with a FORMAT statement) can be a more efficient performer depending on the search size.  And I also would agree that the idea of maintaining a SAS format (no moving parts, like SAS statements) can also be more effective / efficient from a support perspective, particularly when using CNTLIN= to generate the FORMAT itself.&lt;BR /&gt;
&lt;BR /&gt;
As well, consider that PROC FORMAT was enhanced with SAS version 6 to permit character-value range strings which afforded the opportunity for data-string prefix wildcarding, when coded correctly.  Consider that SAS can be influenced in the search/match behavior, choosing either "most discrete match" or "first entry match" when using a particular user FORMAT, as well.&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;
proc format character value range site:sas.com</description>
      <pubDate>Fri, 14 Jan 2011 14:18:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59904#M16930</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2011-01-14T14:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59905#M16931</link>
      <description>I meant to say that several embedded ifn() calls can be more legible than if/then statements.&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
Informats can be clearer or not, and easier to maintain or not depending on the situation. They are defined outside of the datastep in any case, so require non-sequential reading to understand the logic.&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;
All methods have their place, as usual: select, if/then, ifn(), proc format with values, proc format with cntlin datasets. I just wanted to mention embedded ifn()'s legibility as this function is more recent. &lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;
Formats using put() can be slower than tests, as functions are much slower than tests. In any case, unless the code is run billions of times it doesn't really matter. Legibility matters most imho.&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
&lt;BR /&gt;
Here are a few tests. [pre]&lt;BR /&gt;
proc format;&lt;BR /&gt;
  value  type low - 12  = '1'&lt;BR /&gt;
               13 - 19  = '2'&lt;BR /&gt;
               20 - high= '3';&lt;BR /&gt;
run;&lt;BR /&gt;
data _null_;                    * format            5.7s;&lt;BR /&gt;
  AGE=1;&lt;BR /&gt;
  do I=1 to 1e8;&lt;BR /&gt;
  TYPE=put(AGE, type.);&lt;BR /&gt;
  end;&lt;BR /&gt;
run; &lt;BR /&gt;
data _null_;                    * format+informat   6.9s;&lt;BR /&gt;
  AGE=1;&lt;BR /&gt;
  do I=1 to 1e8;&lt;BR /&gt;
  TYPE=input(put(AGE, type.),32.);&lt;BR /&gt;
  end;&lt;BR /&gt;
run; &lt;BR /&gt;
data _null_;                    * if                0.6s;  &lt;BR /&gt;
  AGE=1;&lt;BR /&gt;
  do I=1 to 1e8;&lt;BR /&gt;
    if       AGE le 12 then TYPE= 1;&lt;BR /&gt;
    if 13 le AGE le 19 then TYPE= 2;&lt;BR /&gt;
    if       AGE ge 20 then TYPE= 3;&lt;BR /&gt;
  end;&lt;BR /&gt;
run; &lt;BR /&gt;
data _null_;                    * if else x1        0.5s;&lt;BR /&gt;
  AGE=1;&lt;BR /&gt;
  do I=1 to 1e8;&lt;BR /&gt;
    if            AGE le 12 then TYPE= 1;&lt;BR /&gt;
    else if 13 le AGE le 19 then TYPE= 2;&lt;BR /&gt;
    else if       AGE ge 20 then TYPE= 3;&lt;BR /&gt;
  end;&lt;BR /&gt;
run; &lt;BR /&gt;
data _null_;           &lt;BR /&gt;
  AGE=31;                        * if else x3      0.7s;&lt;BR /&gt;
  do I=1 to 1e8;&lt;BR /&gt;
    if            AGE le 12 then TYPE= 1;&lt;BR /&gt;
    else if 13 le AGE le 19 then TYPE= 2;&lt;BR /&gt;
    else if       AGE ge 20 then TYPE= 3;&lt;BR /&gt;
  end;&lt;BR /&gt;
run; &lt;BR /&gt;
data _null_;         &lt;BR /&gt;
  AGE=31;                         * ifn            7.8s;&lt;BR /&gt;
  do I=1 to 1e8;&lt;BR /&gt;
    TYPE=ifn(       AGE le 12 , 1&lt;BR /&gt;
        ,ifn( 13 le AGE le 19 , 2&lt;BR /&gt;
        ,ifn(       AGE ge 20 , 3, .)));&lt;BR /&gt;
  end;&lt;BR /&gt;
run; &lt;BR /&gt;
data _null_;                       * select        0.9s;&lt;BR /&gt;
  AGE=31;                                          &lt;BR /&gt;
  do I=1 to 1e8;&lt;BR /&gt;
    select;&lt;BR /&gt;
      when(      AGE le 12) TYPE= 1;&lt;BR /&gt;
      when(13 le AGE le 19) TYPE= 2;&lt;BR /&gt;
      when(      AGE ge 20) TYPE= 3;&lt;BR /&gt;
      otherwise;&lt;BR /&gt;
    end;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
data _null_;                      * test as number 1.8s;&lt;BR /&gt;
  AGE=1;&lt;BR /&gt;
  do I=1 to 1e8;&lt;BR /&gt;
    TYPE=(       AGE le 12 ) * 1&lt;BR /&gt;
        +( 13 le AGE le 19 ) * 2&lt;BR /&gt;
        +(       AGE ge 20 ) * 4;&lt;BR /&gt;
  end;&lt;BR /&gt;
run; &lt;BR /&gt;
[/pre]&lt;BR /&gt;
&lt;BR /&gt;
Added "test as number" benchmark (Thanks André).</description>
      <pubDate>Tue, 18 Jan 2011 02:18:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59905#M16931</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2011-01-18T02:18:22Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59906#M16932</link>
      <description>&amp;gt;&amp;gt; Peter, in this case it would, but this is an example, &lt;BR /&gt;
&amp;gt;&amp;gt; values are random and don't matter here. &lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;?????&lt;BR /&gt;
&lt;BR /&gt;
I mean to say that instead of 1,2,3, etc, resulting values could be 1, 22, 56. &lt;BR /&gt;
&lt;BR /&gt;
Chances are test-result values they will almost never be 1,2,3 in real life.&lt;BR /&gt;
The discussion is about the best testing techniques. Which() only works if you want to retrieve the 1,2,3 suite of values, which have been chosen here by pure chance/laziness/lack of imagination. I have changed 3 to 4 in my last benchmark above. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;I thought the informat technique would provide the clearest code while being simplest to manage. &lt;BR /&gt;
 &lt;BR /&gt;
If one has a few cut-off values, I find having the values visible within the data step convenient most times. Of course there are times when one wants to keep all cut-off values together somewhere. Also, if there is a large number of cut-offs, the data step might be more legible without them. Clarity is in the eye of the beholder.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;Does it not also perform better than a series of logic tests on the same data (with/out ELSE)?&lt;BR /&gt;
&lt;BR /&gt;
Not in the runs above. Functions are slower than tests. Using formats in procs is still very fast and convenient though.</description>
      <pubDate>Mon, 24 Jan 2011 02:36:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59906#M16932</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2011-01-24T02:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59907#M16933</link>
      <description>Chris&lt;BR /&gt;
may I respond?&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; Peter, in this case it would, but this is an example, &lt;BR /&gt;
&amp;gt; &amp;gt;&amp;gt; values are random and don't matter here. &lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &amp;gt;?????&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; I mean to say that instead of 1,2,3, etc, resulting&lt;BR /&gt;
&amp;gt; values could be 1, 22, 56. &lt;BR /&gt;
&lt;BR /&gt;
That sounds like replacing input strings or values with a randomly distributed (but subset of the continuum of) values.&lt;BR /&gt;
I have nothing to offer as a "best way" to derive one randon set of values from another, but I do have a use for (and thought we were discussing) determining an array index or table pointer from raw data.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; The discussion is about the best testing techniques.&lt;BR /&gt;
&amp;gt; Which() only works if you want to retrieve the 1,2,3&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt; &lt;BR /&gt;
&amp;gt; &amp;gt;I thought the informat technique would provide the clearest code while being simplest to manage. &lt;BR /&gt;
   &lt;BR /&gt;
&amp;gt; If one has a few cut-off values, I find having the&lt;BR /&gt;
&amp;gt; values visible within the data step convenient most&lt;BR /&gt;
&amp;gt; times. Of course there are times when one wants to&lt;BR /&gt;
&amp;gt; keep all cut-off values together somewhere. Also, if&lt;BR /&gt;
&amp;gt; there is a large number of cut-offs, the data step&lt;BR /&gt;
&amp;gt; might be more legible without them. Clarity is in the&lt;BR /&gt;
&amp;gt; eye of the beholder.  &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;
  &lt;BR /&gt;
&amp;gt; &amp;gt;Does it not also perform better than a series of logic tests on the same data (with/out ELSE)?&lt;BR /&gt;
  &lt;BR /&gt;
&amp;gt; Not in the runs above. &lt;BR /&gt;
&amp;gt; Functions are slower than tests. &lt;BR /&gt;
 &lt;BR /&gt;
This will be true when there are 4 tests for 1 function, and perhaps above 10:1.&lt;BR /&gt;
I guess the threshhold is platform dependant.&lt;BR /&gt;
 &lt;BR /&gt;
I had in mind a credit risk staging area for a bank in which their solution for deriving "business product hierarchy" from a couple of data items was if/then/else SAS code built with a VBA macro from a decision tree table stored in excel. &lt;BR /&gt;
For the user, changes meant re-aligning the decision tree, re-running the VBA macro and moving the generated code to the staging area application. The generated if/then/else logic ran to over 3000 lines (around 1500 tests). It was easy to avoid these tests appearing on the SASlog (/nosource2 on the %include). &lt;BR /&gt;
Maintaining that VBA became unmanageable after personnel changed more than once. Re-writing the VBA in SAS did not take long, but still generated the vast collection of if/then/else code. The alternative solution, involving 2 informats with cntlin data sets from the decision trees, enormously reduced the if/then/else logic and ran a whole lot faster. &lt;BR /&gt;
  &lt;BR /&gt;
&amp;gt; Using formats in procs is still very fast and convenient though.&lt;BR /&gt;
 &lt;BR /&gt;
sure is!&lt;BR /&gt;
and it is handy to have consistency when using the same format in both PROCs and data steps.</description>
      <pubDate>Mon, 24 Jan 2011 11:11:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59907#M16933</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-01-24T11:11:13Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59908#M16934</link>
      <description>Hi Peter,&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;That sounds like replacing input strings or values with a randomly distributed ...&lt;BR /&gt;
&lt;BR /&gt;
The values don't matter here, this is about methods of testing. Tested values or results could be strings in this case.&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;This will be true when there are 4 tests for 1 function, and perhaps above 10:1.&lt;BR /&gt;
I guess the threshhold is platform dependant.&lt;BR /&gt;
&lt;BR /&gt;
Indeed. If a function is 10 times slower than a test, having more than 10 tests makes the function appealing again (and starts cluttering the data step too). As usual, one has to do one's home work depending on the particular circumstances. I suspect testing long strings would be more time consuming testing than short ones for example.&lt;BR /&gt;
&lt;BR /&gt;
The main thing imho though, is that unless these tests are run millions of times, legibility matters most (whatever this means to each of us :o).&lt;BR /&gt;
&lt;BR /&gt;
These runs give an overwhelming speed advantage to formats:&lt;BR /&gt;
&lt;BR /&gt;
[pre]&lt;BR /&gt;
%macro loop;              * create a 2000-else-if test;&lt;BR /&gt;
  %do i=1 %to 2000;&lt;BR /&gt;
     else if A&amp;lt;&amp;amp;i then B=&amp;amp;i;&lt;BR /&gt;
  %end;&lt;BR /&gt;
%mend;&lt;BR /&gt;
data _null_;              *  1 test before match     0.09s;&lt;BR /&gt;
  A=1;&lt;BR /&gt;
  do I=1 to 1e6;&lt;BR /&gt;
    if A&amp;lt;0 then B=1;&lt;BR /&gt;
    %loop&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
data _null_;              * 1000 tests before match   7.2s;&lt;BR /&gt;
  A=1e3;&lt;BR /&gt;
  do I=1 to 1e6;&lt;BR /&gt;
    if A&amp;lt;0 then B=1;&lt;BR /&gt;
    %loop&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
%macro loop;               * create a 2000-when test;&lt;BR /&gt;
  %do i=1 %to 2000;&lt;BR /&gt;
     when(&amp;amp;i)  B=&amp;amp;i;&lt;BR /&gt;
  %end;&lt;BR /&gt;
%mend;&lt;BR /&gt;
data _null_;               * select clause               17s;&lt;BR /&gt;
  A=1;&lt;BR /&gt;
  do I=1 to 1e6;&lt;BR /&gt;
    select(I);&lt;BR /&gt;
      %loop&lt;BR /&gt;
      otherwise;&lt;BR /&gt;
    end;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
data _null_;               * select clause               17s;&lt;BR /&gt;
  A=1e3;&lt;BR /&gt;
  do I=1 to 1e6;&lt;BR /&gt;
    select(I);&lt;BR /&gt;
      %loop&lt;BR /&gt;
      otherwise;&lt;BR /&gt;
    end;&lt;BR /&gt;
  end;&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc format ;              * create a 2000-entry format;&lt;BR /&gt;
value test &lt;BR /&gt;
%macro loop;&lt;BR /&gt;
  %do i=1 %to 2000;&lt;BR /&gt;
     &amp;amp;i="&amp;amp;i"&lt;BR /&gt;
  %end;&lt;BR /&gt;
%mend;&lt;BR /&gt;
%loop;&lt;BR /&gt;
data _null_;               * formats                    0.09s;&lt;BR /&gt;
  A=1e3;&lt;BR /&gt;
  do I=1 to 1e6;&lt;BR /&gt;
    B=input(put(A,test.),32.);&lt;BR /&gt;
  end;&lt;BR /&gt;
run;[/pre]</description>
      <pubDate>Mon, 24 Jan 2011 22:05:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59908#M16934</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2011-01-24T22:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59909#M16935</link>
      <description>Hi.Chris&lt;BR /&gt;
Do you mean that proc format is the most efficient way for judge conditions?&lt;BR /&gt;
What about some other people? Peter.C?&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Tue, 25 Jan 2011 02:40:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59909#M16935</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-01-25T02:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59910#M16936</link>
      <description>no single approach suits all situations</description>
      <pubDate>Tue, 25 Jan 2011 10:43:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59910#M16936</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-01-25T10:43:47Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59911#M16937</link>
      <description>Haha.&lt;BR /&gt;
Peter.C&lt;BR /&gt;
Your words are too ambiguous , which can suit any situation.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Ksharp</description>
      <pubDate>Wed, 26 Jan 2011 03:46:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59911#M16937</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-01-26T03:46:22Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59912#M16938</link>
      <description>Ksharp&lt;BR /&gt;
 &lt;BR /&gt;
I think the original poster's question has been answered &lt;BR /&gt;
"there is benefit from having ELSE among IF tests" &lt;BR /&gt;
 &lt;BR /&gt;
My answer is not "ambiguous" but neccessary a caution; &lt;BR /&gt;
as I think there is no generally "best solution" because I think the "situation" (&lt;BR /&gt;
data volumes, &lt;BR /&gt;
IF complexity,&lt;BR /&gt;
need for support/change-management by "others"&lt;BR /&gt;
) are too important to ignore&lt;BR /&gt;
but these allways vary&lt;BR /&gt;
 &lt;BR /&gt;
imho&lt;BR /&gt;
peterC</description>
      <pubDate>Wed, 26 Jan 2011 08:58:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59912#M16938</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2011-01-26T08:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59913#M16939</link>
      <description>Peter.C&lt;BR /&gt;
I agree with what you said.&lt;BR /&gt;
But as my experience of processing data, proc format is actually to have less time.Namely I agree with Chris too.&lt;BR /&gt;
&lt;BR /&gt;
:-)&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Best Regards&lt;BR /&gt;
Ksharp</description>
      <pubDate>Thu, 27 Jan 2011 01:19:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59913#M16939</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2011-01-27T01:19:13Z</dc:date>
    </item>
    <item>
      <title>Re: if then and else then</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59914#M16940</link>
      <description>&amp;gt; no single approach suits all situations &lt;BR /&gt;
&lt;BR /&gt;
I agree:&lt;BR /&gt;
&lt;BR /&gt;
&amp;gt;As usual, one has to do one's home work depending on the particular circumstances&lt;BR /&gt;
&amp;gt;The main thing imho though, is that unless these tests are run millions of times, legibility matters most&lt;BR /&gt;
&lt;BR /&gt;
It would be as silly to never use formats as to never use tests in the situation discussed here.</description>
      <pubDate>Thu, 27 Jan 2011 03:14:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/if-then-and-else-then/m-p/59914#M16940</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2011-01-27T03:14:12Z</dc:date>
    </item>
  </channel>
</rss>

