how to check if a new variable(s) is added to the dataset and check the values of existing variables with previous month dataset.
there is a dataset zip with the following variables:
zip RDT5 RDT17 RDT23 RDT51
next month RDT75 is added.How to check if new variable is added. and check the values of RDT5 RDT17 RDT23 RDT51 are the same as previous month.
I'm limiting the number of variables only to 5.but in actuality there are 50 variables.
also RDT doesnt contain continous suffix.
This code checks if a new variable has been added to dataset WORK.I compared to WORK.R:
select name into :l0 separated by ' '
from sashelp.vcolumn where LIBNAME="WORK" and memname="I"
select name into :l1 separated by ' '
from sashelp.vcolumn where LIBNAME="WORK" and memname="R"
To check if old variable values have been changed it is good to use suggested proc COMPARE with base=Old dataset Compare=New dataset subsetted to contain old variables only.