<?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 statement not working in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/if-then-statement-not-working/m-p/495271#M31902</link>
    <description>&lt;P&gt;Does your source data have same datatypes for both of the variables disch &amp;amp; death. From what you explained it must be death=disch instead of the opposite way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If they are of different datatypes then create a new variable or rename death from source dataset and create death in new dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Sep 2018 13:16:45 GMT</pubDate>
    <dc:creator>SuryaKiran</dc:creator>
    <dc:date>2018-09-13T13:16:45Z</dc:date>
    <item>
      <title>if-then statement not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/if-then-statement-not-working/m-p/495266#M31900</link>
      <description>&lt;P&gt;Hi. I have the if then statement below. "Disch" is a date variable (format&amp;nbsp;YYYY-MM-DD). When running the code, the DEATH variable is blank even for records where the value of ddest = 20. I wish for the DEATH variable to be populated with the DISCH date when ddest = 20. This seems like it should be quite simple, but apparently&amp;nbsp;I do not know how to do it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;if ddest = 20 then disch = DEATH;&lt;/PRE&gt;</description>
      <pubDate>Thu, 13 Sep 2018 13:05:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/if-then-statement-not-working/m-p/495266#M31900</guid>
      <dc:creator>kfluegge</dc:creator>
      <dc:date>2018-09-13T13:05:48Z</dc:date>
    </item>
    <item>
      <title>Re: if-then statement not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/if-then-statement-not-working/m-p/495270#M31901</link>
      <description>&lt;P&gt;It looks like you got it backwards:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if ddest = 20 then DEATH = disch;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a good idea to read the notes on the log.&amp;nbsp; You should have seen something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE:&amp;nbsp; The variable death is uninitialized.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's SAS's way of saying that it doesn't exist so you can't copy from it.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 13:14:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/if-then-statement-not-working/m-p/495270#M31901</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-09-13T13:14:55Z</dc:date>
    </item>
    <item>
      <title>Re: if-then statement not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/if-then-statement-not-working/m-p/495271#M31902</link>
      <description>&lt;P&gt;Does your source data have same datatypes for both of the variables disch &amp;amp; death. From what you explained it must be death=disch instead of the opposite way.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If they are of different datatypes then create a new variable or rename death from source dataset and create death in new dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 13:16:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/if-then-statement-not-working/m-p/495271#M31902</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-09-13T13:16:45Z</dc:date>
    </item>
    <item>
      <title>Re: if-then statement not working</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/if-then-statement-not-working/m-p/495311#M31903</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4954"&gt;@Astounding&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;It looks like you got it backwards:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if ddest = 20 then DEATH = disch;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It's a good idea to read the notes on the log.&amp;nbsp; You should have seen something like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;NOTE:&amp;nbsp; The variable death is uninitialized.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's SAS's way of saying that it doesn't exist so you can't copy from it.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;And you likely want to make sure that you have a date format of some type assigned to the DEATH variable if disch is a SAS date valued variable.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2018 14:38:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/if-then-statement-not-working/m-p/495311#M31903</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-09-13T14:38:40Z</dc:date>
    </item>
  </channel>
</rss>

