No, I don't think so, because it seems to be related to the numeric precision. If you try this simple example: data a; input @1 identity 15. @1 i1 2. @3 i2 6. @9 i3 4. @13 i4 1. @14 i5 2. @16 code 2.; datalines; 00110129200720301 00110129200720302 00110129200720303 00110129200720401 00110129200720402 00110129200720403 00110129200720404 ; proc sort data=a; by identity; proc summary nway data=a; class i1 i2 i3 i4 i5; var code; output out=ut1 n=number; id identity; proc print data=ut1; data b1; merge a ut1; by identity; proc print data=b1; proc summary nway data=a; class identity; var code; output out=ut2 n=number; proc print data=ut2; data b2; merge a ut2; by identity; proc print data=b2; run; You will see that proc summary cannot take identity with that length in the class statement, but in the id statement it works OK, since merging on that variable provide the correct match. A bit weird that the precision seem to be different within the same procedure?! One solution (thanks SASKiwi) seems to be to read identity as $15. But, I still think it is weird 😉
... View more