Redundancy
It is redundant to name any of these items in a RETAIN statement, because their values are automatically retained from one iteration of the DATA step to the next:
variables that are read with a SET, MERGE, MODIFY or UPDATE statement
a variable whose value is assigned in a sum statement
the automatic variables _N_, _ERROR_, _I_, _CMD_, and _MSG_
variables that are created by the END= or IN= option in the SET, MERGE, MODIFY, or UPDATE statement or by options that create variables in the FILE and INFILE statements
data elements that are specified in a temporary array
array elements that are initialized in the ARRAY statement
elements of an array that have assigned initial values to any or all of the elements in the ARRAY statement.
You can, however, use a RETAIN statement to assign an initial value to any of the previous items, with the exception of _N_ and _ERROR_.
... View more