Here's a SAS/IML module that duplicates the functionality of the ELEMENT function that was introduced in SAS/IML 9.3: start elementMod(x, y); if ncol(x)=0 then return(_NULL_); b = j(nrow(x), ncol(x), 0); if ncol(y)=0 then return(b); u = xsect(x, y); if ncol(u)=0 then return(b); do i = 1 to ncol(u); b = bor(b, (x=u)); end; return (b); finish; New_ID2 = ^elementMod(new, old);
... View more