What did you put into the macro variable Class_vars?
That will determine what gets put into the macro variable ClassVar .
Which will determine if using it this way:
IF(&group_var. = &ClassVar.);
Makes any sense.
For example if CLASS_VARS = Urban Rural National and GROUP_VAR= Geography then you will end up generating code like:
IF (Geography = Urban) ;
Which is valid SAS syntax that will compare the value of the variable GEOGRAPHY to the value of the variable URBAN.
But you printout of the data did not have variable named URBAN.
So you need to generate code like
IF (Geography = "Urban") ;
instead.
... View more