If we assume that means the variable with the largest value of VARNUM then...
[pre]
42 proc sql;
43 select name into :lastName separated by ' '
44 from dictionary.columns
45 where libname='SASHELP' and memname='CLASS'
46 having varnum eq max(varnum)
47 ;
NOTE: The query requires remerging summary statistics back with the original data.
48 quit;
NOTE: PROCEDURE SQL used (Total process time):
real time 0.03 seconds
cpu time 0.03 seconds
Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.