I have a dataset with columns parcomm, subcomm, ccs, prov, data. I'd like to have aggregate result of data for the first four columns. I used spss code as stated below
DEFINE myvars (arg=TOKENS(4)).
aggregate
/OUTFILE=* MODE=ADDVARIABLES
/BREAK=!arg
/sum_!arg=sum(data).
!ENDDEFINE.
myvars parcomm subcomm ccs prov.
The error shows
Error # 10933 in column 2. Text: parcomm The definition of a new variable on the AGGREGATE command must be terminated by a slash. Execution of this command stops.
When I tried just one token, I have the following error:
DEFINE myvars (arg=!TOKENS(1)).
aggregate /OUTFILE=* MODE=ADDVARIABLES
/BREAK=!arg
/sum_sum=sum(data).
!ENDDEFINE.
myvars arg=prov.
Error # 10934 in column 48. Text: prov. The AGGREGATE command specifies an unknown existing variable name. Execution of this command stops.
How should I fix the problem?
!arglike this: ` /sum_!arg=sum(data).` what are you trying to achieve here ? what is the non-macro syntax you would like to run ? In your second piece of code, you are probably using a non-existent variable - eitherdataorprovdo not exist in your dataset - horace_vr