Here is a PROC SQL solution:

proc sql noprint;
create table check as
select memname, name from sashelp.vcolumn
having libname = 'WORK' and count(name) > 1
and name not in('VAR1','VAR2') /* variables to ignore... */
order by memname,name;
quit;