In reply to whymath.

Yes. Instead of using a DICTIONARY table, you could write code such as this:

proc contents data=&DSName;
ods output Variables=VarInfo;
run;

/* Alternative: use PROC SQL and the DICTIONARY tables */
proc sql;
select label into :Labl
from VarInfo
where upcase(Variable)=upcase("&Var");
quit;
%put &=Labl;