accept the inevitable!
take year out of your column names
analyse by <current by and class variables> year
Use by statements (even with a set statement)
After your proc means use proc transpose, if you really
need columns of year
When handling data with year variable in consecutive rows, use
first. and last. tests for by variables.
I can think of no business model where year is so static
that it can be expected to be complete in columns, except
on final output .... which will change by next year !
The number and variety of ways you (can) store year in a
column name is not limited. Probably there are no "complete"
solutions for your model design.
Good Luck in redesigning what you need.