<?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: CPU Time to be Processed in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/CPU-Time-to-be-Processed/m-p/142640#M28573</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;C. &lt;/P&gt;&lt;P&gt;You should order your conditions in the order they occur in the data set, most frequent to less frequent. Also, if conditions are mutually exclusive use the if then is faster than multiple if as in D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Jun 2014 03:41:57 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2014-06-16T03:41:57Z</dc:date>
    <item>
      <title>CPU Time to be Processed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CPU-Time-to-be-Processed/m-p/142638#M28571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;The SAS data set TEMP has the following distribution of values for variable A:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;A Frequency&lt;/P&gt;&lt;P&gt;1 500,000&lt;/P&gt;&lt;P&gt;2 500,000&lt;/P&gt;&lt;P&gt;6 7,000,000&lt;/P&gt;&lt;P&gt;8 3,000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which one of the following SAS programs requires the least CPU time to be processed? &lt;/P&gt;&lt;P&gt;A. data new; set temp; if a = 8 then b = 'Small '; else if a in(1, 2) then b = 'Medium'; else if a = 6 then b = 'Large'; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;B. data new; set temp; if a in (1, 2) then b = 'Medium'; else if a = 8 then b = 'Small'; else if a = 6 then b = 'Large'; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;C. data new; set temp; if a = 6 then b = 'Large '; else if a in (1, 2) then b = 'Medium'; else if a = 8 then b = 'Small';run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;D. data new; set temp; if a = 6 then b = 'Large '; if a in (1, 2) then b = 'Small'; run; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: The above question is from Advance sas practice exam which i found online. i would like to know the correct answer and why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jun 2014 06:34:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CPU-Time-to-be-Processed/m-p/142638#M28571</guid>
      <dc:creator>Sudtej</dc:creator>
      <dc:date>2014-06-15T06:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: CPU Time to be Processed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CPU-Time-to-be-Processed/m-p/142639#M28572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If SAS hits a TRUE, the rest of the if-then-else logic is not executed.&lt;/P&gt;&lt;P&gt;Therefore, one should organize the code, so that the most likely expression to be TRUE, is to be evaluated first.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Jun 2014 12:38:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CPU-Time-to-be-Processed/m-p/142639#M28572</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2014-06-15T12:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: CPU Time to be Processed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/CPU-Time-to-be-Processed/m-p/142640#M28573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;C. &lt;/P&gt;&lt;P&gt;You should order your conditions in the order they occur in the data set, most frequent to less frequent. Also, if conditions are mutually exclusive use the if then is faster than multiple if as in D.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Jun 2014 03:41:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/CPU-Time-to-be-Processed/m-p/142640#M28573</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-06-16T03:41:57Z</dc:date>
    </item>
  </channel>
</rss>

