Via:            UK.AC.LIV.UXB.MAIL; 23 NOV 92 17:15:25 GMT
Acknowledge-To: sbyrne@uxb.liv.ac.uk
X-Mailer:       ELM [version 2.3 PL11]
Newsgroups: bit.listserv.spssx-l
Date:         Mon, 23 Nov 1992 17:17:25 GMT
Reply-To:     sbyrne@uxb.liv.ac.uk
From:         "Mrs. S.M. Byrne" <sbyrne@UXB.LIV.AC.UK>
Subject:      Complex data
Comments: To: spssx-l@ohstvma.acs.ohio-state.edu

Hope SPSSX-L may be able to help out again...

A colleague has some data he would like to analyse using SPSS.
He has written the following code and has embedded a small sample of data:

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

FILE TYPE NESTED RECORD=7-8 CASE=ACC_ID 1-6.
RECORD TYPE 1.
DATA LIST / ACC_REF 11-20 (A) MF 22 DOB 24-33 DOA 35-44 TOA 45-49
        NUM_AC 51-52 NUM_BM 53-54 NUM_EV 55-56 NUM_IN 57-58.
RECORD TYPE 2.
REPEATING DATA STARTS=9 /OCCURS=1
        /DATA=WORK_ACT 1-3.
RECORD TYPE 3.
REPEATING DATA STARTS=9 /OCCURS=1
        /DATA=LOCATION 1-3.
RECORD TYPE 4.
REPEATING DATA STARTS=9 /OCCURS=1
        /DATA=WHERE 1-3.
RECORD TYPE 5.
REPEATING DATA STARTS=9 /OCCURS=NUM_AC
        /DATA=AC_VERB 1-3 AC_OB1 4-7 AC_OB2 8-11.
RECORD TYPE 6.
REPEATING DATA STARTS=9 /OCCURS=NUM_BM
        /DATA=BM_VERB 1-3 BM_OB1 4-7 BM_OB2 8-11.
RECORD TYPE 7.
REPEATING DATA STARTS=9 /OCCURS=NUM_EV
        /DATA=EV_VERB 1-3 EV_OB1 4-7 EV_OB2 8-11 EV_NUM 12-13 EV_MNEM 14-15 (A).
RECORD TYPE 8.
REPEATING DATA STARTS=9 /OCCURS=1
        /DATA=FACTOR 1-3.
RECORD TYPE 9.
REPEATING DATA STARTS=9 /OCCURS=1
        /DATA CAUSE 1-3.
RECORD TYPE 10.
REPEATING DATA STARTS=9 /OCCURS=NUM_IN
        /DATA=INJ_LOC 1-3 INJ_TYPE 4-6.
RECORD TYPE 11.
DATA LIST / DISABIL 9-11 ATTENDED 12-14.
RECORD TYPE 12.
DATA LIST / TRADE 9-11.
END FILE TYPE.

BEGIN DATA
     1 1  R04/465/92 1 02/04/1946 08/09/1992 10.45
     1 2  1  2
     1 3  1
     1 4  1
     1 5  1   1   2
     1 6  1   0   0  2   1   3  3   0   0  4   0   0  5   1   3  6   1   3
     1 7  1   4   3 1ev  2   3   5 2fe  3   0   0 3ev  4   1   2 4ev
     1 8  1   0   0  2   0   0  3   0   0  4   0   0
     110  1  1
     111  1  1
     2 1   RO4/46/92 1 10/04/1960 07/09/1992 20.30
     2 2  3
     2 3  2
     2 4  2
     2 5  2   1   6
     2 6  7   0   0  8   0   0  9   0   0  4   0   0 10   0   0
     2 7  5   1   7 1ev  6   1   0 2ev
     2 8  2   0   0  5   0   0  6   0   0
     210  2  2
     211  2  1
     3 1  R037992/92 2 10/10/1957 25/07/1992 20.30
     3 2  3
     3 4  3  4
     3 5  3   1   8
     3 6  8   0   0  9   0   0  5   1   9 11   1  10
     3 7  7   1  11 1ev  8  12  13 2ev  9   1   0 3ev 10   1  13 4ev 11   1  13
 5ev
     3 8  5   0   0  3   0   0  7   0   0  8   0   0  9   0   0
     310  3  3  2  3
     311  3  1
END DATA.

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

The code does just what he wants, except that it does not work!!!!!!
According to the following sample of error messages he receives:

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

23 Nov 92   SPSS Release 4.0 for Sun 4


For SunOS 4.0           SPSS for Unix -- LOCAL            License Number 60076
This software is functional through January 31, 1993.
....................
   7  1  RECORD TYPE 3.

>Error # 6097 on line 7.  Command name: RECORD TYPE
>The REPEATING DATA command is in an illegal place.  It is not allowed at all
>for GROUPED files, and is permitted only for the last record type in a NESTED
>file.
>No further commands will be executed.  Error scan continues.
....................
*****************************************************************************

there can only be ONE REPEATING DATA clause in a NESTED construct.

Can anyone suggest a data input construct that will work on this data, please?

Thanks,
Sue Byrne,
Computing Services,
Liverpool University,
England.
email:     sbyrne@uk.ac.liverpool       (Janet)
           sbyrne@liverpool.ac.uk