<?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 sas functions in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/sas-functions/m-p/456218#M115533</link>
    <description>&lt;P&gt;Dear&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to find a function that i can be used in the second 'if'&amp;nbsp; statement. Please suggest.Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in the second &lt;FONT color="#FF6600"&gt;if&lt;/FONT&gt; statement, i am trying to find if all three variables missing or all three variables ='UNKNOWN' then set the 'd' variable missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my code;&lt;/P&gt;
&lt;P&gt;data two;&lt;/P&gt;
&lt;P&gt;set one;&lt;/P&gt;
&lt;P&gt;if a="NEGATIVE" and b="NEGATIVE" and c="NEGATIVE" then=d='yes';&lt;/P&gt;
&lt;P&gt;if cmiss(a,b,c) =3 or (a='UNKNOWN'&amp;nbsp; and b=&lt;SPAN&gt;'UNKNOWN'&amp;nbsp; and c='UNKNOWN' ) then d='missing';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;else d='no';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data one;
input a $1-8 b $10-17 c $19-26;
datalines;
NEGATIVE NEGATIVE NEGATIVE
UNKNOWN  UNKNOWN  UNKNOWN
UNKNOWN  
NEGATIVE

;&lt;/PRE&gt;</description>
    <pubDate>Sat, 21 Apr 2018 19:07:41 GMT</pubDate>
    <dc:creator>knveraraju91</dc:creator>
    <dc:date>2018-04-21T19:07:41Z</dc:date>
    <item>
      <title>sas functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-functions/m-p/456218#M115533</link>
      <description>&lt;P&gt;Dear&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to find a function that i can be used in the second 'if'&amp;nbsp; statement. Please suggest.Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in the second &lt;FONT color="#FF6600"&gt;if&lt;/FONT&gt; statement, i am trying to find if all three variables missing or all three variables ='UNKNOWN' then set the 'd' variable missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;my code;&lt;/P&gt;
&lt;P&gt;data two;&lt;/P&gt;
&lt;P&gt;set one;&lt;/P&gt;
&lt;P&gt;if a="NEGATIVE" and b="NEGATIVE" and c="NEGATIVE" then=d='yes';&lt;/P&gt;
&lt;P&gt;if cmiss(a,b,c) =3 or (a='UNKNOWN'&amp;nbsp; and b=&lt;SPAN&gt;'UNKNOWN'&amp;nbsp; and c='UNKNOWN' ) then d='missing';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;else d='no';&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data one;
input a $1-8 b $10-17 c $19-26;
datalines;
NEGATIVE NEGATIVE NEGATIVE
UNKNOWN  UNKNOWN  UNKNOWN
UNKNOWN  
NEGATIVE

;&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 Apr 2018 19:07:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-functions/m-p/456218#M115533</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2018-04-21T19:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: sas functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-functions/m-p/456219#M115534</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/68272"&gt;@knveraraju91&lt;/a&gt; wrote:&lt;BR /&gt;
&lt;P&gt;Dear&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to find a function that i can be used in the second 'if'&amp;nbsp; statement. Please suggest.Thank you&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in the second &lt;FONT color="#FF6600"&gt;if&lt;/FONT&gt; statement, i am trying to find if all three variables missing or all three variables ='UNKNOWN' then set the 'd' variable missing.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It's not clear to me what the question is. You haven't actually asked a question.&lt;/P&gt;</description>
      <pubDate>Sat, 21 Apr 2018 19:10:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-functions/m-p/456219#M115534</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-04-21T19:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: sas functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-functions/m-p/456226#M115535</link>
      <description>&lt;P&gt;I suspect that what you mean to do is :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data two;
set one;
if a="NEGATIVE" and b="NEGATIVE" and c="NEGATIVE" then d='yes';
else if cmiss(a,b,c) =3 or (a='UNKNOWN'  and b='UNKNOWN'  and c='UNKNOWN' ) then d='missing';
else d='no';
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 21 Apr 2018 19:49:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-functions/m-p/456226#M115535</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2018-04-21T19:49:35Z</dc:date>
    </item>
    <item>
      <title>Re: sas functions</title>
      <link>https://communities.sas.com/t5/SAS-Programming/sas-functions/m-p/456238#M115539</link>
      <description>&lt;P&gt;I'm not sure you meant to re-use the variable name D all the time.&amp;nbsp; But here is an approach you can use.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if a=b=c then do;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;if a in (' ', 'NEGATIVE') then d='yes';&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;else d='no';&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Apr 2018 23:17:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/sas-functions/m-p/456238#M115539</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-04-21T23:17:08Z</dc:date>
    </item>
  </channel>
</rss>

