Detect multi-punch responses in SPSS syntax? I have a dataset that includes an open-ended response that was coded into categories by a vendor. The vendor created 50 multi-punch categories stored as 50 true/false variables. 
By putting this in a multiple response set and cross-tabbing it with itself I can see that most responses seem to be in a small number of categories - the crosstab is strongly diagonal.
For the purposes of an analysis I would like to perform, the categories can only be single-punch. Short of sending this back to the vendor and having them re-categorize over 6,000 responses, I'd like to solve this programmatically if the number of affected responses is small enough. I'd like to write a syntax file that can count the number of respondents categorized into each number of categories - say, 5000 assigned to one category, 1000 assigned to two categories, 500 assigned to three, and so on... If the number assigned to multiple categories is small enough, I'd like to just throw out the ones that were assigned to multiple categories.
Is there an effective way to do this in SPSS syntax? Writing the logic for each possible pair / triplet / quadruplet of multi-response data would be impossible given that I have 50 categories. Any ideas?
 A: It sounds like a simple sum command would work to identify if a response had multiple positive responses to the same category.
So say X1_1,X1_2,...X1_50 are the dummy variables for survey item X1. The command
compute X1_sum = SUM(X1_1 to X1_50).
freq var = X1_sum.

Would result in a variable, X1_sum, that would be a total of all the items (i.e. the number who have assigned 1 category, 2 categories, etc..). The only caveat of this is that the statement, X1_1 to X1_50 to work they need to be in order in the dataset.
You could make your own macro function to do this for all of the items, which could probably be reduced in complexity and number of parameters passed based on how your variables are coded. An example could be;
define !sum_response (name =  !TOKENS(1) 
/ begin = !TOKENS(1) 
/ end = !TOKENS(1) ).
compute !name = SUM(!begin to !end).
execute.
freq var !name.
!enddefine.

!sum_response name = X1_sum begin = X1_1 end = X1_50.

This is not a real great example, as the produced function takes as much writing as does the original compute command. But this could be further simplified if you have other consistent naming conventions (and I can give examples if needed). Such as if all your responses have the suffix as I did above, you could reduce the macro to only passing one statement (the X1 in my example). If all the responses are coded in a similar progressive manner (e.g. X1,X2,X3...) you could write code to loop through all of the variables without needing to call the macro for each set (you could do this anyway even if the names aren't in a consistent manner, but the code would be much more verbose and perhaps would not save any time over just writing the separate calls). 
I can't give any more advice without being more explicit about what you want to accomplish (such as how to handle cases that have multiple responses). I cringe about the suggestion of throwing out cases, but without knowing more I could not give any useful advice. This should get you started though, and you can either update this question or ask a new question about how to handle the multiple responses if you can't figure it out on your own.
