<?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 statement in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/If-then-statement/m-p/122643#M33705</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to create a variable "usedate" where usedate will take the value of "termdate" and if "termdate" is not available it would take the value of "sentdate." While I'm familiar with how to write it in SPSS, I'm not sure how to write it in SAS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Feb 2013 13:56:38 GMT</pubDate>
    <dc:creator>AshleyM</dc:creator>
    <dc:date>2013-02-27T13:56:38Z</dc:date>
    <item>
      <title>If then statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-then-statement/m-p/122643#M33705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to create a variable "usedate" where usedate will take the value of "termdate" and if "termdate" is not available it would take the value of "sentdate." While I'm familiar with how to write it in SPSS, I'm not sure how to write it in SAS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 13:56:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-then-statement/m-p/122643#M33705</guid>
      <dc:creator>AshleyM</dc:creator>
      <dc:date>2013-02-27T13:56:38Z</dc:date>
    </item>
    <item>
      <title>Re: If then statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-then-statement/m-p/122644#M33706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If by not available you mean the value is missing then you could do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if not missing(termdate) then usedate=termdate;&lt;/P&gt;&lt;P&gt;else usedate=sentdate;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you could use the coalese function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;usedate=coalese(termdate,sentdate);&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 13:59:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-then-statement/m-p/122644#M33706</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2013-02-27T13:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: If then statement</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/If-then-statement/m-p/122645#M33707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect. Thank you! &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Feb 2013 14:59:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/If-then-statement/m-p/122645#M33707</guid>
      <dc:creator>AshleyM</dc:creator>
      <dc:date>2013-02-27T14:59:35Z</dc:date>
    </item>
  </channel>
</rss>

