Dear SAS support team, I'm not sure how to approach this analysis and what is the best way, here is what I want to do: DATA A: I have a file with one row per observation, and for each observation I have the dates of repeated tests so I have test1 date, test2 dates etc. Data B: I have another data which has the same observations as above but with many rows per individual or observation. The data for a prescription date for a certain drug, some observations has more than 200 dates for prescription. What I need to do is to find if those individuals in data A with repeated test in a certain date for example in 2010 if they had a prescription for the drug in DATA B before the date of the test. I want to flat file (make one row per observation) DATA B to link it with A, but I don't know how to do that with arrays if some has 200 prescription dates. My goal is to know if those with repeated tests have taken this drug before the test or not. Do I compress the data by month year better to make it shorter, will it be better to extract the data for each year to make the prescription date lower for each patient for example (2010, 2011, 2012, and only do the analysis for each year separately)?? I'm having a hard time to do it. and I need it to be done as soon as possible I appreciate so much your help, and you've been a great support to me always. Here is a simple display of how my data, sorry I can't upload the data for privacy issues. DATA A: patient id test1date test2date test3 date 1 01JAN2011 03MAY2012 04JUN2014 2 ....so on DATA B: patient id prescription date 1 01JAN2010 1 05MAY2013 1 25JUL2013 1 so on
... View more