<?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: Comparing Arrays in same dataset? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400435#M97076</link>
    <description>&lt;P&gt;PG, I'm unaware of how to use intersect, can you please provide more information?&amp;nbsp; Thanks.&lt;/P&gt;</description>
    <pubDate>Mon, 02 Oct 2017 20:04:04 GMT</pubDate>
    <dc:creator>shellp55</dc:creator>
    <dc:date>2017-10-02T20:04:04Z</dc:date>
    <item>
      <title>Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400154#M97005</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am using SAS 9.3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My objective is to take the inpatient data set, link it to the ED dataset (for those admitted via the Emergency Department) and determine if the same procedure with the same procedure date is coded in both datasets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My original step was to combine the two datasets via proc SQL where the ED dispoistion date = inpatient admit date and that is working fine (though I welcome any feedback on whether this is the correct approach).&amp;nbsp; So now I have a dataset per chart number with 20 possible procedures (pxcde1-pxcde20) and 10 potential ED procedures (px1-px10).&amp;nbsp; I also have 20 possible inpatient procedure dates pxstdate1-pxstdate20) and 10 possible ED procedure dates (pxdt1-pxdt10).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What I want to do is compare the inpatient procedure with procedure date to the ED procedures and procedure dates to see if they match.&amp;nbsp; Below is some test data where registration 002, 004 and 005 should be matched and the other two are not.&amp;nbsp; I appreciate any and all assistance, thanks..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test_grp;
input @1 chart $5.
	  @6 regn  $3.
	  @9 AdmDate yymmdd8.
      @17 DisDate yymmdd8.
	  @25 D_Px1 $5.
	  @30 D_Px2 $5.
	  @35 PxDt1 yymmdd8.
	  @43 PxDt2 yymmdd8.
	  @51 N_Px1 $5.
	  @56 N_Px2 $5.
	  @61 N_PDt1 yymmdd8.
	  @69 N_PDt2 yymmdd8.
;
format admdate disdate PxDt1-PxDt2 N_PDt1-N_PDt2 yymmdd8.;
cards;
A123400120120329201204023AN201GV5220120330201203303GY201GV522012032920120329
A586700220120429201205051VC743AN2020120429201204293AN20     20120429
A898900320120529201205313OT20     20120529        3OT203AN202012052820120528
A232400420120629201207153GY201GV5220120629201206293GY201GV522012062920120629
A285500520120704201207143OT203AN2020120704201207043OT203AN202012070420120704
run; 

&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Oct 2017 19:03:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400154#M97005</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2017-10-01T19:03:38Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400166#M97009</link>
      <description>&lt;P&gt;You'll need a loop.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create two arrays one for each set.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Loop through the shorter one and use WHICHC to search for the same code in the other array.&lt;/P&gt;
&lt;P&gt;Assuming you've already set up the arrays, using _array1/_array2, here's what your code may look like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;flag=0;

do i=1 to dim(_array1);
    if whichc(_array1(i), of _array2(*)) then flag=1;
end;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 01 Oct 2017 21:35:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400166#M97009</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-01T21:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400184#M97016</link>
      <description>&lt;P&gt;If your data had a &lt;EM&gt;long&lt;/EM&gt; structure, you could simply do a SQL INTERSECT between both sets.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 03:35:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400184#M97016</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-10-02T03:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400185#M97017</link>
      <description>&lt;P&gt;Your data should be organised like this, and then everything becomes simple:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table 1&lt;/P&gt;
&lt;TABLE width="268"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;chart&lt;/TD&gt;
&lt;TD width="64"&gt;regn&lt;/TD&gt;
&lt;TD width="71"&gt;AdmDate&lt;/TD&gt;
&lt;TD width="69"&gt;DisDate&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A1234&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;12/03/2029&lt;/TD&gt;
&lt;TD&gt;12/04/2002&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A5867&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;12/04/2029&lt;/TD&gt;
&lt;TD&gt;12/05/2005&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A8989&lt;/TD&gt;
&lt;TD&gt;3&lt;/TD&gt;
&lt;TD&gt;12/05/2029&lt;/TD&gt;
&lt;TD&gt;12/05/1931&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A2324&lt;/TD&gt;
&lt;TD&gt;4&lt;/TD&gt;
&lt;TD&gt;12/06/2029&lt;/TD&gt;
&lt;TD&gt;12/07/2015&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A2855&lt;/TD&gt;
&lt;TD&gt;5&lt;/TD&gt;
&lt;TD&gt;12/07/2004&lt;/TD&gt;
&lt;TD&gt;12/07/2014&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table 2&lt;/P&gt;
&lt;TABLE width="376"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="79"&gt;chart&lt;/TD&gt;
&lt;TD width="79"&gt;regn&lt;/TD&gt;
&lt;TD width="76"&gt;PXD_NO&lt;/TD&gt;
&lt;TD width="71"&gt;PXD_DT&lt;/TD&gt;
&lt;TD width="71"&gt;PXD&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A1234&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;12/03/1930&lt;/TD&gt;
&lt;TD&gt;3AN20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A1234&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;12/03/1930&lt;/TD&gt;
&lt;TD&gt;1GV52&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A5867&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;12/04/2029&lt;/TD&gt;
&lt;TD&gt;3AN20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A5867&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;12/04/2029&lt;/TD&gt;
&lt;TD&gt;1VC74&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table3&lt;/P&gt;
&lt;TABLE width="348"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="64"&gt;chart&lt;/TD&gt;
&lt;TD width="71"&gt;regn&lt;/TD&gt;
&lt;TD width="71"&gt;PXN_NO&lt;/TD&gt;
&lt;TD width="71"&gt;PXN_DT&lt;/TD&gt;
&lt;TD width="71"&gt;PXN&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A1234&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;12/03/2029&lt;/TD&gt;
&lt;TD&gt;3GY20&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A1234&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;12/03/2029&lt;/TD&gt;
&lt;TD&gt;1GV52&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD&gt;A5867&lt;/TD&gt;
&lt;TD&gt;2&lt;/TD&gt;
&lt;TD&gt;1&lt;/TD&gt;
&lt;TD&gt;12/04/2029&lt;/TD&gt;
&lt;TD&gt;3AN20&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 04:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400185#M97017</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-10-02T04:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400243#M97023</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PGStats, thanks for that but it would take a few more&amp;nbsp; steps to get it into long format ...which i can do but i want to ask a few more questions about Reeza's suggestion.&amp;nbsp; Reeza, I have two qualifying statements i.e. the procedure AND the procedure date must match between the two so how do I do this with your suggestion?&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 13:14:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400243#M97023</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2017-10-02T13:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400289#M97038</link>
      <description>&lt;P&gt;Create two arrays for your dates as well.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you find the match, the WHICHC will return the index. This means you have two pointers, the i variable and the results from WHICHC.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Use those to check if the dates match in the arrays. If you can have multiple diagnosis in the same line this may not work...&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 14:53:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400289#M97038</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-02T14:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400433#M97074</link>
      <description>&lt;P&gt;Sorry Reeza, I'm not understanding your response.&amp;nbsp; Using my fake data, how would this be done?&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 20:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400433#M97074</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2017-10-02T20:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400435#M97076</link>
      <description>&lt;P&gt;PG, I'm unaware of how to use intersect, can you please provide more information?&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 20:04:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400435#M97076</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2017-10-02T20:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400447#M97081</link>
      <description>&lt;P&gt;Rows of a table can be considered as elements of a set. There are three set operations defined in SQL: UNION, EXCEPT and INTERSECT. They are described here:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/documentation/cdl/en/sqlproc/63043/HTML/default/viewer.htm#p1o6k7t8y56hobn1mup90vpf4ye6.htm" target="_self"&gt;http://support.sas.com/documentation/cdl/en/sqlproc/63043/HTML/default/viewer.htm#p1o6k7t8y56hobn1mup90vpf4ye6.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Oct 2017 20:28:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/400447#M97081</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-10-02T20:28:07Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401059#M97245</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sorry but still struggling with this.&amp;nbsp; I looked up intersect and because the files have to be the same, this won't allow me to identify the actual case afterwards.&amp;nbsp; For example, acctno is different on the two datasets because they are two different data types (ED and inpatient).&amp;nbsp; Unless I'm missing something about intersect?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 17:03:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401059#M97245</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2017-10-04T17:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401065#M97247</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;array _proc1(*) &amp;lt;list of variables&amp;gt;;
array _proc2(*) &amp;lt;list of variables&amp;gt;;
array _date1(*) &amp;lt;list of variables&amp;gt;;
array _date1(*) &amp;lt;list of variables&amp;gt;;

flag=0;

do i=1 to dim(_proc1);
    find_index = whichc(_proc1(i), of _proc2(*))
    if find_index &amp;gt; 0 then do;
          *check dates;
            if _date(i) = _date2(find_index) then flag=1;
     end;
end;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Oct 2017 18:19:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401065#M97247</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-04T18:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401067#M97248</link>
      <description>&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15342"&gt;@shellp55&lt;/a&gt; note that I didn't test the code, I'm leaving that to you, but hopefully it gives you the idea.</description>
      <pubDate>Wed, 04 Oct 2017 17:15:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401067#M97248</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-04T17:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401077#M97252</link>
      <description>&lt;P&gt;Thanks Reeza!&amp;nbsp; Just wondering what the code of&lt;/P&gt;
&lt;PRE class=" language-sas"&gt;&lt;CODE class="  language-sas"&gt;&lt;SPAN class="token function"&gt;dim&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;(&lt;/SPAN&gt;_array1&lt;SPAN class="token punctuation"&gt;)"&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;is supposed to be doing?&amp;nbsp; It produces an error.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 17:29:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401077#M97252</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2017-10-04T17:29:15Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401079#M97253</link>
      <description>&lt;P&gt;It's the loop control. Since I changed the names of the array, change the _array1 to be _proc1&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 17:30:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401079#M97253</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-04T17:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401090#M97257</link>
      <description>&lt;P&gt;I am marking this complete (Reeza's code) because it worked for the test dataset provided.&amp;nbsp; However it isn't working for my real dataset.&amp;nbsp; I am assuming that the larger array (the DAD has 20 versus ED has 10) should be array1 but it is flagging cases as being valid when no procedure matches.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 17:50:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401090#M97257</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2017-10-04T17:50:49Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401094#M97260</link>
      <description>&lt;P&gt;array1 should be the smaller list.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This doesn't account for missing though so you may want to add a filter for missing to stop the DO loop.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 17:56:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401094#M97260</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-04T17:56:15Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401102#M97264</link>
      <description>&lt;P&gt;Got it, makes sense because it is matching blank to blank and considers that a match.&amp;nbsp; Sorry for being dense but not sure how to add that filter...but I will search the site.&amp;nbsp; Thanks again for all your help.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 18:16:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401102#M97264</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2017-10-04T18:16:49Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401103#M97265</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if missing(_proc1(i)) then leave;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I think you add that into the top of the do loop.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This does assume that once you find a missing value all other values will be missing, which is pretty much how I recall medical data being formatted.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2017 18:20:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401103#M97265</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-04T18:20:05Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401105#M97267</link>
      <description>It's leave or break...you can test them &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;</description>
      <pubDate>Wed, 04 Oct 2017 18:20:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401105#M97267</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-10-04T18:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Comparing Arrays in same dataset?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401113#M97272</link>
      <description>&lt;P&gt;Thanks Reeza!&amp;nbsp; I've tried the code in various spots but it still shows as zero cases and I know there are some matching the criteria.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I've used:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;do I = 1 to dim(_proc1);
find_index=whichc(_proc1(i) of _proc2(*));
if missing(_proc1(i)) then leave;
else if find_index&amp;gt;0 then do;
if _date1(i)=_date2(find_index) then flag=1;
end;
end;

&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 04 Oct 2017 18:40:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Comparing-Arrays-in-same-dataset/m-p/401113#M97272</guid>
      <dc:creator>shellp55</dc:creator>
      <dc:date>2017-10-04T18:40:06Z</dc:date>
    </item>
  </channel>
</rss>

