design
you have run-time information in a variable (in I presume, more than one row) of a data-set. So, why try to solve the lookup with compile-time information like macro variables?
The classic solutions would be either an indexed set statement, or an informat lookup (well, you have a string and want the corresponding numeric value from another table).
Since SAS9 the new alternative to consider is a hash table lookup. Over formats and informats, hash tables have the advantage of indexing on multiple keys and can return more than one value, and all these keys and data can be of mixed data-types.
Each of these alternative techniques will feature among the Samples you'll find searchable in the
http://support.sas.com site.
Good luck as you discover the wealth of ideas provided there.
PeterC