I'm sorry- I don't know VA and I don't know how to manipulate the data in VA.
In regular SAS if you had the following
data list1;
input id;
datalines;
1101
1102
1103
1104
1106
1107
1108
1110
;
run;
data list2;
input id;
datalines;
1101
1102
1103
1105
1106
1107
1108
1109
;
run;
You could use Proc SQL to create the list types that I think you want:
*show me things in both list1 and list2;
proc sql;
title "Things in Both Lists";
select list1.id
from list1 inner join list2 on list1.id = list2.id;
quit;
*show me things in list1 not in list2;
proc sql;
title "Things Only in List1";
select list1.id
from list1 left join list2 on list1.id = list2.id
where list2.id is null;
quit;
*show me things in list2 not in list1;
proc sql;
title "Things Only in List2";
select list2.id
from list2 left join list1 on list2.id = list1.id
where list1.id is null;
quit;
*show me things in only one list and which one it is in;
proc sql;
title "Things Only in One of the Lists";
select "Only in List1", list1.id
from list1 left join list2 on list1.id = list2.id
where list2.id is null
union
select "Only in List2", list2.id
from list2 left join list1 on list2.id = list1.id
where list1.id is null;
quit;
Results:
Things in Both Lists
id
1101
1102
1103
1106
1107
1108
Things Only in List1
id
1104
1110
Things Only in List2
id
1105
1109
Things Only in One of the Lists
id
Only in List1 1104
Only in List1 1110
Only in List2 1105
Only in List2 1109
I don't know if you can use Proc SQL in VA to make a table that you then draw against for a visual, but I thought i would post something since you had no replies.
... View more