It does not work because of a common error in SPSS syntax: putting in EXECUTE all over the place.
Code: Select all
SELECT IF @10_a_package=1.
DESCRIPTIVES VARIABLES=@11_cost @11_cost_party /STATISTICS=MEAN STDDEV MIN MAX.
The point being that in both your original syntax and the one above @11_cost_party is created as a temporary variable.
The moment you read the active dataset it is created, and then disappears without a trace. Since you had an execute between the first and second select if you did create the variable and then SPSS promptly forgot about it again. It is quite useful behavior, actually, especially for table creation.