LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 9 Sep 2003 07:41:40 -0400
Reply-To:     Raynald Levesque <rlevesque@videotron.ca>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         Raynald Levesque <rlevesque@videotron.ca>
Subject:      Re: Aggregate macro
In-Reply-To:  <ED3B7BFAB81FE54A99DB8C92EFB5F2F61F8821@exchpta.askafrika.co.za>
Content-type: text/plain; charset=US-ASCII

Hi Grant

try the following:

DEFINE !myvar() tpe1 tpe2 tpe3 tpe4 !ENDDEFINE. DEFINE !mybrk() INTRO !ENDDEFINE.

AGGREGATE /OUTFILE='c:\temp\aggr.sav' /BREAK=!mybrk / !myvar = Mean(!myvar).

The trick is that a macro call cannot be at the end of a line which is a continuation line.

Regards

Raynald Levesque rlevesque@videotron.ca Visit my SPSS site: http://pages.infinit.net/rlevesqu/

-----Original Message----- From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU]On Behalf Of Grant Robertson Sent: September 9, 2003 3:11 AM 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


Back to: Top of message | Previous page | Main SPSSX-L page