I am rather a beginner in SAS. I have the following problem. Given is a big data set (my_time) which I imported into SAS looking as follows I want to implement the following algorithm for every account look for a status and if it is equal to na then look for the same contract after one year (one year after it gets the status na) and put the information "my_date", "status" and "money" in three new columns "new_my_date", "new_status" and "new_money" like in I need something like countifs in excel. I found loops in SAS like DO but not for the purpose to look through all rows. I do not even know for which key word I have to look. I would be grateful for any hint.
... View more