If you do a PROC CONTENTS on dataset2:
proc contents data=dataset2;
and then look at the list of variables, what is the type and format for the "year" variables???? SAS variable names cannot start with a number, they generally start with an underscore from transpose, such as _2001 and _2002. Can you paste the variable information to the forum???
It is possible. $w.d is only the cloth of variable ,in sas it is numeric.
if you want different cloth for the same variable ,you can create another variable to contain the format then use function putn() or putc() to get it.