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
|