point 1 is just counting the number of act='M956' and agencyspellbegin ge "7 months ago" and agencyspellbegin le today() how do you calculate 7 months ago? with the magic intnx function. intnx('month',mdy(month(today()),1,year(today()),-7) let's explain, intnx increments the given date with the interval given and the number of intervals. interval = month and number = -7. point 2 is calculating the age. So you ask sas the number of months between date of birth and today devided by 12. c=intck('month',dob,today())/12; c gives you the age in years but with a detail after the comma. with this calculated column you can then identify the age. if you want to count, same story as point 1. the hidden question about knowing if the shild is returned is using the first and last pointer in a datastep. added detail
... View more