<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/399981#M96914</link>
    <description>&lt;DIV&gt;&lt;STRONG&gt;The following SAS program is submitted:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;data work.passengers;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;if OrigPassengers = . then&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;OrigPassengers = 100;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;TransPassengers = 100;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;OrigPassengers = .;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;TotalPassengers = sum (OrigPassengers, TransPassengers) +0;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;What is the value of the TOTALPASSENGERS variable in the output data set?&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Answer is 100, why not 200??&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Please help, thanks!!!&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Sat, 30 Sep 2017 08:27:05 GMT</pubDate>
    <dc:creator>pchen002</dc:creator>
    <dc:date>2017-09-30T08:27:05Z</dc:date>
    <item>
      <title>if-then</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/399981#M96914</link>
      <description>&lt;DIV&gt;&lt;STRONG&gt;The following SAS program is submitted:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;data work.passengers;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;if OrigPassengers = . then&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;OrigPassengers = 100;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;TransPassengers = 100;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;OrigPassengers = .;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;TotalPassengers = sum (OrigPassengers, TransPassengers) +0;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV class="rteindent1"&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;What is the value of the TOTALPASSENGERS variable in the output data set?&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Answer is 100, why not 200??&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Please help, thanks!!!&lt;/STRONG&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 30 Sep 2017 08:27:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/399981#M96914</guid>
      <dc:creator>pchen002</dc:creator>
      <dc:date>2017-09-30T08:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: if-then</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/399982#M96915</link>
      <description>&lt;P&gt;Missing + 100 + 0 = 100&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you move your IF statement further down, the answer will be 200.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 08:31:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/399982#M96915</guid>
      <dc:creator>Norman21</dc:creator>
      <dc:date>2017-09-30T08:31:01Z</dc:date>
    </item>
    <item>
      <title>Re: if-then</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/399992#M96918</link>
      <description>&lt;P&gt;Statements within the DATA step execute in order.&amp;nbsp; Leaving out TransPassengers from the analysis, that means:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(1) set OrigPassengers to 100&lt;/P&gt;
&lt;P&gt;(2) set OrigPassenters to .&lt;/P&gt;
&lt;P&gt;(3) compute TotalPassengers&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;At the time TotalPassengers is computed, OrigPassengers is missing.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 12:36:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/399992#M96918</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-09-30T12:36:32Z</dc:date>
    </item>
    <item>
      <title>Re: if-then</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/400006#M96929</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/163028"&gt;@pchen002&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;DIV&gt;&lt;STRONG&gt;The following SAS program is submitted:&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV class="rteindent1"&gt;&lt;EM&gt;data work.passengers;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class="rteindent1"&gt;&lt;EM&gt;if OrigPassengers = . then&amp;nbsp;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class="rteindent1"&gt;&lt;EM&gt;OrigPassengers = 100;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class="rteindent1"&gt;&lt;EM&gt;TransPassengers = 100;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class="rteindent1"&gt;&lt;EM&gt;OrigPassengers = .;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV class="rteindent1"&gt;&lt;EM&gt;TotalPassengers = sum (OrigPassengers, TransPassengers) +0;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV class="rteindent1"&gt;&lt;EM&gt;run;&lt;/EM&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;What is the value of the TOTALPASSENGERS variable in the output data set?&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;Answer is 100, why not 200??&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;STRONG&gt;Please help, thanks!!!&lt;/STRONG&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Why should it be 200? In the sum() function, missing values are considered zero.&lt;/P&gt;
&lt;P&gt;Start reading the f*cking documentation, your continuing questions on extremely simple issues start to reveal you as a person with an allergy to think on your own.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 15:54:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/400006#M96929</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2017-09-30T15:54:28Z</dc:date>
    </item>
    <item>
      <title>Re: if-then</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/400013#M96931</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/163028"&gt;@pchen002&lt;/a&gt;&amp;nbsp; Although this is a open technical forum, &lt;STRONG&gt;Kindly&lt;/STRONG&gt; do not consider this as &lt;STRONG&gt;school homework forum or education forum&lt;/STRONG&gt;. The spirit of the discussions should be kept interesting for everybody, which means both the original poster as well as for responders. The questions that you post will add really no value to many if not all.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 17:33:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/400013#M96931</guid>
      <dc:creator>Andygray</dc:creator>
      <dc:date>2017-09-30T17:33:04Z</dc:date>
    </item>
    <item>
      <title>Re: if-then</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/400050#M96948</link>
      <description>&lt;P&gt;Ok... &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp; I think there's a bit of piling on here that needs to stop. Not that the point isn't correct but this seems to cross over the considerate/polite boundary. Please remember that you're not required to respond and that's the best way to not support this type of behaviour. And yes, I've done this myself at times, so I do get it &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/163028"&gt;@pchen002&lt;/a&gt;&amp;nbsp;please use some consideration in your posts. Here's a post that explains how to post good questions&amp;nbsp;&lt;A href="https://stackoverflow.com/help/how-to-ask" target="_blank"&gt;https://stackoverflow.com/help/how-to-ask&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you're genuinely attempting to learn please show an attempt and you'll find a lot of support and help. But so far, you've posted questions, not responded to follow ups and the questions are literally copy and paste from whatever study material you're using.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And another point - good study material explains the examples/questions and doesn't depend on the free help&amp;nbsp;of others. Consider the SAS certification guide which has fully explained problems and examples. It's worth the small price, or consider checking with your University library or Safari tech books which have the guides.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good Luck.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 23:07:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/400050#M96948</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-09-30T23:07:08Z</dc:date>
    </item>
    <item>
      <title>Re: if-then</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/400067#M96958</link>
      <description>Thank you!</description>
      <pubDate>Sun, 01 Oct 2017 01:36:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/400067#M96958</guid>
      <dc:creator>pchen002</dc:creator>
      <dc:date>2017-10-01T01:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: if-then</title>
      <link>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/400068#M96959</link>
      <description>Understood, thank you!!!</description>
      <pubDate>Sun, 01 Oct 2017 01:36:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/if-then/m-p/400068#M96959</guid>
      <dc:creator>pchen002</dc:creator>
      <dc:date>2017-10-01T01:36:34Z</dc:date>
    </item>
  </channel>
</rss>

