This is easily generalizable to variables that appear in only one data set, all but one data set, and so forth.

data D1 D2;
A=1; b=2; C=3; D=4; E=5; F=6; g=7; h=8; I=9; J=10;
run;
data D3 D4;
j=1; f=2; h=3; a=4; N=7; L=6; c=7;
run;
data D5;
J=1; D=2; A=3; g=4; h=5; P=6; q=7;
run;
data D6;
C=1; M=2; F=3; a=4; j=5; H=6; B=7; R=8; K=9;
run;

proc sql;
create table allvars as
select
memname ,
upcase(name) as name
from
dictionary.columns
where
libname = 'WORK' and memname eqt 'D';
select distinct
name
from
allvars
group by
name
having
count(*) =
(
select
count(distinct(memname))
from
allvars
);
quit;

You could combine the two SQL statements into a single statement.