1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
* 	Suppose the Following represents your data file. Also assume the correct
	responses to Likert1 thru Likert10 are respectively 3 5 2 3 2 5 4 4 4 2  
	You can use the following code to score such a test.

DATA LIST /I1 to I10 1-10 (F) COMMENT 14-60 (A).
BEGIN DATA
2315441435
3234254515
4254352353
1543254451
4554215323
5455315435
2132234332
3523254442   Subject with perfect CORRECT SCORE
2462142551   Subject with perfect INCORRECT SCORE
END DATA .
SAVE OUTFILE 'D:\\RAW.SAV'.

DATA LIST / X1 TO X10 1-10.
BEGIN DATA
3523254442
END DATA .

MATCH FILES FILE  'D:\\RAW.SAV' /FILE * .
LEAVE X1 TO X10.
COMPUTE TOTAL  = 0.
DO REPEAT ITEM = I1 TO I10 / CORRECT = X1 TO X10.
COMPUTE TOTAL  = TOTAL + (ITEM = CORRECT) .
END REPEAT.
MATCH FILES FILE * / DROP X1 TO X10.


LIST.