Date: Tue, 9 Sep 2003 10:58:49 +0100
Reply-To: JC Dashper <johndashper@SELECTIVE.CO.UK>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: JC Dashper <johndashper@SELECTIVE.CO.UK>
Subject: Re: Aggregate macro
Content-Type: text/plain; charset="iso-8859-1"
I had a similar 'why wont this work?' problem and Raynald suggested using
!eval which forces the 'expansion' of the macro definition.
Its in the manual, by the way, for a better definition.
So, depending on which bit is causing your problem try (either or both) :
/BREAK=!eval(!mybrk)
/!myvar = Mean(!eval(!myvar)).
Good luck
John Dashper.
-----Original Message-----
From: Grant Robertson [mailto:grant@askafrika.co.za]
Sent: 09 September 2003 08:11
To: SPSSX-L@LISTSERV.UGA.EDU
Subject: Aggregate macro
Hi,
I'm struggling to figure out why this works:
AGGREGATE
/OUTFILE='c:\temp\aggr.sav'
/BREAK=INTRO
/tpe1 tpe2 tpe3 = Mean(tpe1 tpe2 tpe3).
BUT this doesn't:
DEFINE !myvar() tpe1 tpe2 tpe3 tpe4 !ENDDEFINE.
DEFINE !mybrk() INTRO !ENDDEFINE.
AGGREGATE
/OUTFILE='c:\temp\aggr.sav'
/BREAK=!mybrk
/!myvar = Mean(!myvar).
Any pointers will be appreciated.
Thank you
Grant