<?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: variable in data with an if-condition in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/variable-in-data-with-an-if-condition/m-p/755701#M30032</link>
    <description>&lt;P&gt;Good for you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 21 Jul 2021 16:46:47 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-07-21T16:46:47Z</dc:date>
    <item>
      <title>variable in data with an if-condition</title>
      <link>https://communities.sas.com/t5/New-SAS-User/variable-in-data-with-an-if-condition/m-p/755582#M30009</link>
      <description>&lt;P&gt;Hi guys, it's me again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You helped me a lot but i have one more question &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the following code:&lt;/P&gt;&lt;PRE&gt;data Work.test;
      set input;
      value = 0.4* value_input;
      reference_number = if value &amp;gt; 0 then reference_number = 123 else 345;
run;&lt;/PRE&gt;&lt;P&gt;My data has different positive and negative values in the variable value_input.&lt;/P&gt;&lt;P&gt;The aim should be, that positive values get the reference_number&amp;nbsp; 345 and all other values get the reference_number 123.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get three syntax errors:&lt;/P&gt;&lt;P&gt;1. Missing !,!!, &amp;amp; ...&lt;/P&gt;&lt;P&gt;2. Expecting an arithmetic operator&lt;/P&gt;&lt;P&gt;3. The option or parameter is not recognized and will be ignored&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Would be great if you could help me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 09:25:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/variable-in-data-with-an-if-condition/m-p/755582#M30009</guid>
      <dc:creator>Hansi_12345</dc:creator>
      <dc:date>2021-07-21T09:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: variable in data with an if-condition</title>
      <link>https://communities.sas.com/t5/New-SAS-User/variable-in-data-with-an-if-condition/m-p/755587#M30011</link>
      <description>&lt;P&gt;I found the solution. &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;data Work.test;
      set input;
      value = 0.4* value_input;
      if value &amp;gt; 0 then reference_number = 123; else reference_number = 345;
run;&lt;/PRE&gt;&lt;P&gt;Sorry for disturbing you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have a nice day &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 10:22:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/variable-in-data-with-an-if-condition/m-p/755587#M30011</guid>
      <dc:creator>Hansi_12345</dc:creator>
      <dc:date>2021-07-21T10:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: variable in data with an if-condition</title>
      <link>https://communities.sas.com/t5/New-SAS-User/variable-in-data-with-an-if-condition/m-p/755701#M30032</link>
      <description>&lt;P&gt;Good for you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jul 2021 16:46:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/variable-in-data-with-an-if-condition/m-p/755701#M30032</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-07-21T16:46:47Z</dc:date>
    </item>
  </channel>
</rss>

