Data list question

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Data list question

Maguin, Eugene
All,

Here's something that seems very odd to me. Allegedly, the same statements,
one in column format and one in fortran format. Maybe I've done something
obviously wrong but I'm not sure what it is. The error message seems
incorrect and the variable definition section is wrong also. But the fortran
format works and the column format doesn't.

Gene Maguin

****************************************************************.
*  READ CROSSTAB CELLS AND PROCESS TO IDENTIFY PROBLEM CELLS.
****************************************************************.
DATA LIST FILE='R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT'
    / SPLITFILE 1-4 TABLE 5-8 COUNT 9-16 ROW 17-24 COL 25-32.

Data List will read 1 records from R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT

Variable          Rec   Start     End  Format
SPLITFILE           1       1       1  F1.0

>Error # 4143 in column 27.  Text: 5
>Column format was used on the DATA LIST command, but the number of columns
>specified is not evenly divisible by the number of variables specified.
>Execution of this command stops.


DATA LIST FILE='R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT'
    / SPLITFILE TABLE COUNT ROW COL (2F4.0,3F8.0).

Data List will read 1 records from R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT

Variable          Rec   Start     End  Format
SPLITFILE           1       1       4  F4.0
TABLE               1       5       8  F4.0
COUNT               1       9      16  F8.0
ROW                 1      17      24  F8.0
COL                 1      25      32  F8.0
EXECUTE.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Data list question

John F Hall
Gene
 
Weird.  Does it work if you insert / rec 1 ....?
 
DATA LIST FILE='R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT'
    / rec 1
    / SPLITFILE 1-4 TABLE 5-8 COUNT 9-16 ROW 17-24 COL 25-32.
. . . or 1 after the slash?
    / 1 SPLITFILE 1-4 TABLE 5-8 COUNT 9-16 ROW 17-24 COL 25-32.
 
----- Original Message -----
Sent: Thursday, November 18, 2010 11:42 PM
Subject: Data list question

All,

Here's something that seems very odd to me. Allegedly, the same statements,
one in column format and one in fortran format. Maybe I've done something
obviously wrong but I'm not sure what it is. The error message seems
incorrect and the variable definition section is wrong also. But the fortran
format works and the column format doesn't.

Gene Maguin

****************************************************************.
*  READ CROSSTAB CELLS AND PROCESS TO IDENTIFY PROBLEM CELLS.
****************************************************************.
DATA LIST FILE='R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT'
    / SPLITFILE 1-4 TABLE 5-8 COUNT 9-16 ROW 17-24 COL 25-32.

Data List will read 1 records from R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT

Variable          Rec   Start     End  Format
SPLITFILE           1       1       1  F1.0

>Error # 4143 in column 27.  Text: 5
>Column format was used on the DATA LIST command, but the number of columns
>specified is not evenly divisible by the number of variables specified.
>Execution of this command stops.


DATA LIST FILE='R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT'
    / SPLITFILE TABLE COUNT ROW COL (2F4.0,3F8.0).

Data List will read 1 records from R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT

Variable          Rec   Start     End  Format
SPLITFILE           1       1       4  F4.0
TABLE               1       5       8  F4.0
COUNT               1       9      16  F8.0
ROW                 1      17      24  F8.0
COL                 1      25      32  F8.0
EXECUTE.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Data list question

Maguin, Eugene
Hi John,

It doesn't make a difference. Same problem.

Furthermore, this doesn't work either and I think it should based on the
documentation.

Gene Maguin

DATA LIST FILE='R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT'
    /1 SPLITFILE TABLE 1-8 COUNT ROW COL 9-32.

Data List will read 1 records from R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT

Variable          Rec   Start     End  Format

>Error # 4143 in column 24.  Text: 1
>Column format was used on the DATA LIST command, but the number of columns
>specified is not evenly divisible by the number of variables specified.
>Execution of this command stops.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD
Reply | Threaded
Open this post in threaded view
|

Re: Data list question

Lemon, John S.

Gene

 

I may well be being a bit dense but I would imagine that as the syntax for DATA LIST is:

 

DATA LIST [FILE='file'] [ENCODING='encoding specification']

[{FIXED}]                        

  {FREE }  [{("delimiter", "delimiter",..., TAB)}]

  {LIST }  

[RECORDS={1}] [SKIP={n}] [{TABLE  }]

         {n}              {NOTABLE}

/{1    } varname {col location [(format)]} [varname ...]

  {rec #}         {(FORTRAN-like format)  }

 

And TABLE appears as an option / subcommand then this could well be the problem as SPSS is expecting a variable name between TABLE and the number – perhaps try prefixing all your variables names with an ‘X’ and see what happens. I know that when I started using SPSS in 1975 on mainframes we were warned against using anything that looked remotely like an SPSS command or option !!

 

Best Wishes

 

John S. Lemon

DIT ( Directorate of Information Technology ) - Student Liaison Officer

University of Aberdeen

Edward Wright Building: Room G86a

Tel:  +44 1224 273350

 

DIT news for Students

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Gene Maguin
Sent: 19 November 2010 14:25
To: [hidden email]
Subject: Re: Data list question

 

Hi John,

 

It doesn't make a difference. Same problem.

 

Furthermore, this doesn't work either and I think it should based on the documentation.

 

Gene Maguin

 

DATA LIST FILE='R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT'

    /1 SPLITFILE TABLE 1-8 COUNT ROW COL 9-32.

 

Data List will read 1 records from R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT

 

Variable          Rec   Start     End  Format

 

>Error # 4143 in column 24.  Text: 1

>Column format was used on the DATA LIST command, but the number of

>columns specified is not evenly divisible by the number of variables specified.

>Execution of this command stops.

 

=====================

To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD



The University of Aberdeen is a charity registered in Scotland, No SC013683.
Reply | Threaded
Open this post in threaded view
|

Re: Data list question

Maguin, Eugene
In reply to this post by Maguin, Eugene
Jon,
 
Yes, that was it. Thank you. I had a nonprinting character. In retrospect, i should have thought of that because i copied the file definition chunk from the either the syntax reference or the help file page on the crosstabs write subcommand.
 
Gene Maguin


From: Jon K Peck [mailto:[hidden email]]
Sent: Friday, November 19, 2010 9:38 AM
To: Gene Maguin
Subject: Re: [SPSSX-L] Data list question

I wonder whether you have some nonprinting character in your syntax or the dash character isn't actually the usual dash.  I copied the syntax from the email, and it worked properly.  (I changed the file name, of course.)  If you want to send me an actual file that contains the failing syntax I can look for things like this.

Jon Peck
Senior Software Engineer, IBM
[hidden email]
312-651-3435




From:        Gene Maguin <[hidden email]>
To:        [hidden email]
Date:        11/19/2010 07:27 AM
Subject:        Re: [SPSSX-L] Data list question
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Hi John,

It doesn't make a difference. Same problem.

Furthermore, this doesn't work either and I think it should based on the
documentation.

Gene Maguin

DATA LIST FILE='R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT'
   /1 SPLITFILE TABLE 1-8 COUNT ROW COL 9-32.

Data List will read 1 records from R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT

Variable          Rec   Start     End  Format

>Error # 4143 in column 24.  Text: 1
>Column format was used on the DATA LIST command, but the number of columns
>specified is not evenly divisible by the number of variables specified.
>Execution of this command stops.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD

Reply | Threaded
Open this post in threaded view
|

Re: Data list question

John F Hall
In reply to this post by Lemon, John S.
As Bruce Weaver always reminds us, it helps to RTFM.
 
----- Original Message -----
Sent: Friday, November 19, 2010 3:29 PM
Subject: Re: Data list question

Gene

 

I may well be being a bit dense but I would imagine that as the syntax for DATA LIST is:

 

DATA LIST [FILE='file'] [ENCODING='encoding specification']

[{FIXED}]                        

  {FREE }  [{("delimiter", "delimiter",..., TAB)}]

  {LIST }  

[RECORDS={1}] [SKIP={n}] [{TABLE  }]

         {n}              {NOTABLE}

/{1    } varname {col location [(format)]} [varname ...]

  {rec #}         {(FORTRAN-like format)  }

 

And TABLE appears as an option / subcommand then this could well be the problem as SPSS is expecting a variable name between TABLE and the number – perhaps try prefixing all your variables names with an ‘X’ and see what happens. I know that when I started using SPSS in 1975 on mainframes we were warned against using anything that looked remotely like an SPSS command or option !!

 

Best Wishes

 

John S. Lemon

DIT ( Directorate of Information Technology ) - Student Liaison Officer

University of Aberdeen

Edward Wright Building: Room G86a

Tel:  +44 1224 273350

 

DIT news for Students

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Gene Maguin
Sent: 19 November 2010 14:25
To: [hidden email]
Subject: Re: Data list question

 

Hi John,

 

It doesn't make a difference. Same problem.

 

Furthermore, this doesn't work either and I think it should based on the documentation.

 

Gene Maguin

 

DATA LIST FILE='R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT'

    /1 SPLITFILE TABLE 1-8 COUNT ROW COL 9-32.

 

Data List will read 1 records from R:\FWT\ANALYSES\PARENTAPQ\CELLS11.TXT

 

Variable          Rec   Start     End  Format

 

>Error # 4143 in column 24.  Text: 1

>Column format was used on the DATA LIST command, but the number of

>columns specified is not evenly divisible by the number of variables specified.

>Execution of this command stops.

 

=====================

To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD



The University of Aberdeen is a charity registered in Scotland, No SC013683.