What you might do is get them to make a view for each yearly dataset (they were yearly datasets, iirc). They could use a single common code to mask what they want to mask in each such view. Then you could just select from a union of the subset of view of interest to you.
It would be a minimal one-time (or one-time per year) effort on the db manager's part. And not only would you save time, but they would conserve a lot of computing resources for use by your colleagues.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.