06-15-2016 07:44 PM
Its never a redundancy, I would consider it explict versus implicit.
If you use the sum statement, it includes an implicit retain, but expliclity declaring that retain isn't a redundancy in my opinion it's just an explicit declaration so the user knows ahead of time that it will be retained.
In all other cases other than implicit the retain statement is required if you want to retain the value across rows.
I'm actually having a hard time understanding the rationale behind question, maybe you can expand on what you're looking for if it's understanding.
If its for an answer to a test question, it's a bad question IMO.
06-16-2016 06:01 AM
All variables that come from a SAS data set are automatically retained. So RETAIN is redundant when the variable(s) named come from a SAS data set.
There are other cases, such as the one PGStats mentioned.