<?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: What is the Merge in this code doing? in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/What-is-the-Merge-in-this-code-doing/m-p/75811#M22011</link>
    <description>It is deleting any record where the claim number exists in both data sets. (Or, it is keeping records for which the claim number exists in one, but not both, data sets)</description>
    <pubDate>Fri, 27 Feb 2009 18:32:51 GMT</pubDate>
    <dc:creator>Paige</dc:creator>
    <dc:date>2009-02-27T18:32:51Z</dc:date>
    <item>
      <title>What is the Merge in this code doing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-is-the-Merge-in-this-code-doing/m-p/75810#M22010</link>
      <description>Hi, &lt;BR /&gt;
I have the following code that takes a huge file houtpt073 and deletes all appropriate rows based off certain column headings (serv_type, provider_id) for all non-outpatient claims. I can follow the code until it gets to the merge statement, where I don't understand what is happening.  I would like to be able to recreate this in Access.  Can someone please explain the "then delete" portion?&lt;BR /&gt;
&lt;BR /&gt;
DATA H1;&lt;BR /&gt;
 SET HF.HOUTPT073;&lt;BR /&gt;
&lt;BR /&gt;
 IF SERV_TYPE3 IN ('EMERGENCY');&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
DATA H2;&lt;BR /&gt;
 SET HF.HOUTPT073;&lt;BR /&gt;
&lt;BR /&gt;
 IF SERV_TYPE1 IN ('OUTPATIENT');&lt;BR /&gt;
 IF SUBSTR(PROVIDER_ID,1,2) IN ('81','82') THEN DELETE;&lt;BR /&gt;
&lt;BR /&gt;
RUN;&lt;BR /&gt;
&lt;BR /&gt;
PROC SORT DATA=H1 NODUPKEY; BY CLAIM_NUMBER; RUN;&lt;BR /&gt;
PROC SORT DATA=H2; BY CLAIM_NUMBER; RUN;&lt;BR /&gt;
&lt;BR /&gt;
DATA HF.SMD2224Q;&lt;BR /&gt;
 MERGE H1(IN=A) H2(IN=B);&lt;BR /&gt;
 BY CLAIM_NUMBER;&lt;BR /&gt;
 IF A AND B THEN DELETE;&lt;BR /&gt;
RUN;</description>
      <pubDate>Fri, 27 Feb 2009 18:29:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-is-the-Merge-in-this-code-doing/m-p/75810#M22010</guid>
      <dc:creator>hina</dc:creator>
      <dc:date>2009-02-27T18:29:34Z</dc:date>
    </item>
    <item>
      <title>Re: What is the Merge in this code doing?</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/What-is-the-Merge-in-this-code-doing/m-p/75811#M22011</link>
      <description>It is deleting any record where the claim number exists in both data sets. (Or, it is keeping records for which the claim number exists in one, but not both, data sets)</description>
      <pubDate>Fri, 27 Feb 2009 18:32:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/What-is-the-Merge-in-this-code-doing/m-p/75811#M22011</guid>
      <dc:creator>Paige</dc:creator>
      <dc:date>2009-02-27T18:32:51Z</dc:date>
    </item>
  </channel>
</rss>

