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 (December 2003)Back to main SPSSX-L pageJoin or leave SPSSX-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 1 Dec 2003 17:46:01 +0200
Reply-To:     "Paparodopoulos, Nikos" <NPaparodopoulos@ing.gr>
Sender:       "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From:         "Paparodopoulos, Nikos" <NPaparodopoulos@ing.gr>
Subject:      Different time periods used in a Macro
Content-Type: text/plain; charset="iso-8859-7"

Hi,

I am using a macro to run some procedures from year 1999 to 2002. All the procedures for this period are on a yearly basis.However I would like to make the same macro to repeat exactly the same calculations for the period 1-1-2003 up to 1-11-2003 as well.

I am using:

DEFINE !SPLIT().

!DO !YEAR=1999 !TO 2002.

get file='D:\Home\TOTUWGT99.sav '.

*** CALCULATE INITIAL & END DATES *****.

COMPUTE #ONEDAY=24*60*60.

COMPUTE BEG1=MAX(DATBEG, DATE.DMY(1,1,!YEAR)).

COMPUTE END1=MIN(DATEND,DATE.DMY(1,1,!YEAR+1)).

******** ******* ********* ************** *********************

!doend.

!enddefine.

!split.

How could I add the extra 11 month period of 2003 to the above macro?

Thanks in advance.

Best Regards

Nikos Paparodopoulos


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