Hi Experts, Kindly go through my sample dataset for the clear picture. data aaa;
input Id Vdate mmddyy10. visit;
format Vdate date9.;
cards;
12 10/11/2012 1
12 02/08/2013 2
12 01/09/2013 3
12 01/01/2014 4
63 05/06/2010 1
63 02/08/2010 2
63 07/11/2011 3
63 09/09/2011 4
;
data bbb;
input Id Rdate mmddyy10. BP;
format Rdate date9.;
cards;
12 10/11/2012 89
12 04/08/2013 56
12 05/09/2013 78
63 05/06/2010 45
63 06/08/2010 12
63 08/11/2011 32
63 09/09/2011 65
;
/*
OP
ID VDate Visit RDate BP
12 10/11/2012 1 10/11/2012 89
12 02/08/2013 2 04/08/2013 56
12 01/09/2013 3 05/09/2013 78
12 01/01/2014 4 . .
63 05/06/2010 1 05/06/2010 45
63 02/08/2010 2 06/08/2010 12
63 07/11/2011 3 08/11/2011 32
63 09/09/2011 4 09/09/2011 65
*/ I need to update the BP value through the matched date. I updated the step where VisitDate and RecordDate are the same. But I failed to match the case where the RecordDate is > VisitDate. In those cases, I need to update the value of Rdate in between the Vdates. For reference, I placed the required OP. Thanks in advance!
... View more