Create multiple cases through syntax

astr

New Member
#1
Hi!

I need to create a set of data in SPSS containing two variables: HOUSEHOLD NUMBER (1000 households, but the numbers of the households are not from 1 to 1000) and MONTH (12 months for 5 years). For each month for each household there should be a separate case, 60 cases per household in total. The file should be sorted by household number. Could anyone help me with the syntax please?

I could create HOUSEHOLD NUMBER variable with LOOP function, but I'm really stuck with the MONTH variable. With the LOOP the only thing I could get is:
01.2004
01.2004
01.2004 (1000 times)

12.2008
12.2008
12.2008 (1000 times)

Whereas what I need is:
01.2004
02.2004
03.2004

10.2008
11.2008
12.2008 (60 times)* (1000 times)
So basically I have 60 cases (going from 01.2004 to 12.2008) which I need to copy 1000 times.

Any advice would be highly appreciated.

Thanks in advance,
Alina