This creates flags that indicate if an ID has both A and B, or both A and C.
proc sql;
create table want as select *,
max(index='A')*max(index='B') as flag_ab,
max(index='A')*max(index='C') as flag_ac
from have
group by id;
quit;
I advise against splitting these up into separate data sets, as that is usually unnecessary. If you want to do an analysis of just the IDs that have both A and B, you can use (in a PROC or DATA step)
where flag_ab=1;
--
Paige Miller