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?
IF SERV_TYPE3 IN ('EMERGENCY');
IF SERV_TYPE1 IN ('OUTPATIENT');
IF SUBSTR(PROVIDER_ID,1,2) IN ('81','82') THEN DELETE;
PROC SORT DATA=H1 NODUPKEY; BY CLAIM_NUMBER; RUN;
PROC SORT DATA=H2; BY CLAIM_NUMBER; RUN;
MERGE H1(IN=A) H2(IN=B);
IF A AND B THEN DELETE;