Do you get an ERROR in the LOG when you run this??? What does happen when you run this???
VARNAME is the name of a SAS variable. If this variable exists, it should contain as values the name of SAS variables ... so the NOT IN tests to see if the value of variable varname is not in the collection of values: 1 and 2 and 3; but these values are not a valid names for a SAS variable, which has to be a character string and can't begin with a number.
So this code doesn't make the slightest bit of sense to me.
--
Paige Miller