SAS' wonderful functions can do this for you too or am i missing something obvious?
var a b c
1 .m .d

sumchk = sum(of a,b,c);
or nmiss (a,b,c) if they're not 1/0/missings;