<?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 Why the is missing operator is not working with if then statement? in SAS Data Science</title>
    <link>https://communities.sas.com/t5/SAS-Data-Science/Why-the-is-missing-operator-is-not-working-with-if-then/m-p/111469#M939</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data one;&lt;/P&gt;&lt;P&gt;infile datalines missover;&lt;/P&gt;&lt;P&gt;input age;&lt;/P&gt;&lt;P&gt;if age is missing then age=9999;&lt;/P&gt;&lt;P&gt;else age=age;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;8&lt;/P&gt;&lt;P&gt;01&lt;/P&gt;&lt;P&gt;20&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;proc print;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 19 Jul 2012 11:19:41 GMT</pubDate>
    <dc:creator>devarayalu</dc:creator>
    <dc:date>2012-07-19T11:19:41Z</dc:date>
    <item>
      <title>Why the is missing operator is not working with if then statement?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Why-the-is-missing-operator-is-not-working-with-if-then/m-p/111469#M939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data one;&lt;/P&gt;&lt;P&gt;infile datalines missover;&lt;/P&gt;&lt;P&gt;input age;&lt;/P&gt;&lt;P&gt;if age is missing then age=9999;&lt;/P&gt;&lt;P&gt;else age=age;&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;8&lt;/P&gt;&lt;P&gt;01&lt;/P&gt;&lt;P&gt;20&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;2&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;proc print;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 11:19:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Why-the-is-missing-operator-is-not-working-with-if-then/m-p/111469#M939</guid>
      <dc:creator>devarayalu</dc:creator>
      <dc:date>2012-07-19T11:19:41Z</dc:date>
    </item>
    <item>
      <title>Re: Why the is missing operator is not working with if then statement?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Why-the-is-missing-operator-is-not-working-with-if-then/m-p/111470#M940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;You probably want the missing FUNCTION.&amp;nbsp; Try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if missing(age) then age=9999;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also I would suggest you use SAS special missing values instead of numeric codes.&amp;nbsp; So:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if missing(age) then age=.S;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Q.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 12:18:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Why-the-is-missing-operator-is-not-working-with-if-then/m-p/111470#M940</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2012-07-19T12:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Why the is missing operator is not working with if then statement?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Why-the-is-missing-operator-is-not-working-with-if-then/m-p/111471#M941</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Also, the "is missing" syntax is used with the "where" clause, as in Proc SQL or as a filter on Proc freq, for example.&lt;/P&gt;&lt;P&gt;Proc freq data = . . . ;&lt;/P&gt;&lt;P&gt;where age is missing ;&lt;/P&gt;&lt;P&gt;tables . .&amp;nbsp; . ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In a DATA step, use:&lt;/P&gt;&lt;P&gt;if age = . then age = 9999 ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(and you really don't need the else clause)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 13:28:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Why-the-is-missing-operator-is-not-working-with-if-then/m-p/111471#M941</guid>
      <dc:creator>cwilson</dc:creator>
      <dc:date>2012-07-19T13:28:46Z</dc:date>
    </item>
    <item>
      <title>Re: Why the is missing operator is not working with if then statement?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Science/Why-the-is-missing-operator-is-not-working-with-if-then/m-p/111472#M942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;if missing(age) then age=9999;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Jul 2012 15:22:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Science/Why-the-is-missing-operator-is-not-working-with-if-then/m-p/111472#M942</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2012-07-19T15:22:32Z</dc:date>
    </item>
  </channel>
</rss>

