<?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: How to use Exists Keyword in Base SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-Exists-Keyword-in-Base-SAS/m-p/227402#M40972</link>
    <description>You question is still unclear, what do you mean "exists"? That it's not missing? if so you can use the n or nmiss() function.&lt;BR /&gt;&lt;BR /&gt;data match unlatch;&lt;BR /&gt;set final;&lt;BR /&gt;if nmiss(field1, field2)&amp;gt;0 then output unmatch;&lt;BR /&gt;else output match;&lt;BR /&gt;run;</description>
    <pubDate>Sat, 26 Sep 2015 19:25:37 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2015-09-26T19:25:37Z</dc:date>
    <item>
      <title>How to use Exists Keyword in Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-Exists-Keyword-in-Base-SAS/m-p/227399#M40971</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 20px;"&gt;I'm new to the Base SAS Concepts.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can anyone help me on the below scenario&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm having dataset called FINALand it has the below records&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;S.no Name &amp;nbsp; July_salary(Field1) &amp;nbsp; August_Salary(Field2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 &amp;nbsp; &amp;nbsp; &amp;nbsp;xxxx &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;20000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 21000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 &amp;nbsp; &amp;nbsp; &amp;nbsp;yyyy &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;34000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 30500&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3 &amp;nbsp; &amp;nbsp; zzzz &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 89000 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; --------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 20px;"&gt;Creating two datasets by keeping FINAL datatset.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Match&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Unmatch;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; SET&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; FINAL;&lt;/P&gt;&lt;P&gt;................. ?????????&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to report if the Field1 is exists or &amp;gt;0 and Field2 is exists or &amp;gt;0 then output to Match Dataset else output to UnMatch Dataset&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So Match dataset should contain 1 &amp;amp; 2 row &amp;nbsp;and Unmatch dataset should contain 3 row.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please share your ideas on how to proceed with this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 26 Sep 2015 18:32:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-Exists-Keyword-in-Base-SAS/m-p/227399#M40971</guid>
      <dc:creator>AshokD</dc:creator>
      <dc:date>2015-09-26T18:32:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to use Exists Keyword in Base SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-use-Exists-Keyword-in-Base-SAS/m-p/227402#M40972</link>
      <description>You question is still unclear, what do you mean "exists"? That it's not missing? if so you can use the n or nmiss() function.&lt;BR /&gt;&lt;BR /&gt;data match unlatch;&lt;BR /&gt;set final;&lt;BR /&gt;if nmiss(field1, field2)&amp;gt;0 then output unmatch;&lt;BR /&gt;else output match;&lt;BR /&gt;run;</description>
      <pubDate>Sat, 26 Sep 2015 19:25:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-use-Exists-Keyword-in-Base-SAS/m-p/227402#M40972</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-09-26T19:25:37Z</dc:date>
    </item>
  </channel>
</rss>

