In this example, we save the XTAB output into a SAV file:
* Created data for example.
data list free /row col n.
begin data.
1 1 23
1 2 13
1 3 21
2 1 35
2 2 31
2 3 15
3 1 37
3 2 43
3 3 21
end data.
weight by n.
* Use OMS to get cells.
OMS SELECT TABLES /IF SUBTYPES='Crosstabulation'
/DESTINATION FORMAT=SAV OUTFILE='/Users/rick/tmp/test.sav'.
CROSSTABS
/TABLES=row BY col /FORMAT=AVALUE TABLES /CELLS=COUNT
/COUNT ROUND CELL.
OMSEND.
* Get that file and keep only what is needed.
GET FILE '/Users/rick/tmp/test.sav' /drop Command_ to Label_ Var3.
SELECT IF Var2 ne ''.
EXECUTE.
* If you want the cells all in one observation...
CASESTOVARS /ID=Var1 /GROUPBY=VARIABLE.
------------------------------
Rick Marcantonio
Quality Assurance
IBM
------------------------------