Hi Andreas,
Here are the datalines,
data test; input ID STDT: date9. RESPONSE GAP RESULT; FORMAT stdt DATE9.; datalines ; 1 06MAR2017 3 63 3 1 08MAY2017 3 18 3 1 26MAY2017 3 35 6 1 30JUN2017 3 87 6 1 25SEP2017 5 80 5 1 14DEC2017 3 88 3 1 12MAR2018 3 . 6 2 19APR2017 2 33 2 2 22MAY2017 3 56 3 2 17JUL2017 2 57 2 2 12SEP2017 2 56 2 2 07NOV2017 2 56 2 2 02JAN2018 2 56 2 2 27FEB2018 2 84 2 2 22MAY2018 2 84 2 2 14AUG2018 2 84 3 2 06NOV2018 3 . 6 ; run;
The iteration should yield the last column called Result.
Thanks for your help.
... View more