bugPSPP - Bugs: bug #30690, DATETIME without width and quotes...

 
 

bug #30690: DATETIME without width and quotes fails to import

Submitted by:  None
Submitted on:  Sun 08 Aug 2010 06:47:57 PM UTC  
 
Category: Syntax ParserSeverity: 5 - Average
Status: FixedAssigned to: None
Open/Closed: ClosedRelease: Before 0.8.0
Effort: 0.00

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 25 Nov 2012 01:50:59 AM UTC, comment #8:

Fixed with commit c3dd7acbbaca29 "DATA LIST: Accept freefield format types without widths use minimum width."

Ben Pfaff <blp>
Project Administrator
Fri 13 Aug 2010 04:20:28 PM UTC, comment #7:

Thanks. I'm attaching a copy of that .png also just in case it disappears from the website sometime later.

(file #21212)

Ben Pfaff <blp>
Project Administrator
Fri 13 Aug 2010 05:59:01 AM UTC, comment #6:

There you go:

http://dl.dropbox.com/u/1977824/Screen%20shot%202010-08-13%20at%2007.57.15.png

Andreas Lappe <crazynd>
Thu 12 Aug 2010 07:22:14 PM UTC, comment #5:

Thank you for the command syntax.

Now I am curious about the format actually used. Can you run the following command (in SPSS) and report what it says?

Thanks again.

Ben Pfaff <blp>
Project Administrator
Thu 12 Aug 2010 05:53:33 AM UTC, comment #4:

DATA LIST FREE(TAB)
/CASE (F8.0)
REF (A255)
SERIAL (A255)
LASTPAGE (F8.0)
QUESTNNR (A255)
MODE (A16)
STARTED (DATETIME)
FINISHED (F1.0)
A001 (F3.0)
A002 (F3.0)
A003 (F3.0)
A004 (F3.0)
A004_07 (A32767)
A005 (F3.0)
A005_09 (A32767)
A101 (F3.0)
A102 (F3.0)
A103_01 (F1.0)
A103_02 (F1.0)
A103_03 (F1.0)
A103_03a (A32767)
A104_01 (F1.0)
A104_02 (F1.0)
A104_03 (F1.0)
A104_04 (F1.0)
A104_05 (F1.0)
A104_05a (A32767)
A105 (F3.0)
A106 (F3.0)
A107_01 (F1.0)
A107_02 (F1.0)
A108 (F3.0)
A109_01 (F1.0)
A109_02 (F1.0)
A109_03 (F1.0)
A109_03a (A32767)
A110_01 (F1.0)
A110_02 (F1.0)
A110_03 (F1.0)
A110_04 (F1.0)
A110_04a (A32767)
A111_01 (F1.0)
A111_02 (F1.0)
A111_03 (F1.0)
A111_04 (F1.0)
A111_04a (A32767)
A112_01 (F1.0)
A112_02 (F1.0)
A112_03 (F1.0)
A112_04 (F1.0)
A112_05 (F1.0)
A112_05a (A32767).
BEGIN DATA
1 \t \t \t 11 \t surveyname \t interview \t 24-07-2010 14:22:05 \t 1 \t 2 \t 3 \t 2 \t 3 \t \t 2 \t \t 1 \t 1 \t 2 \t 2 \t 1 \t \t \t \t \t \t \t \t 1 \t 1 \t 2 \t 1 \t 3 \t 2 \t 2 \t 1 \t \t \t \t \t \t \t \t \t \t \t \t 1 \t 2 \t 2 \t 1 \t 1 \t \t
END DATA.
VARIABLE WIDTH REF SERIAL QUESTNNR MODE A004_07 A005_09 A103_03a A104_05a A109_03a A110_04a A111_04a A112_05a (8) STARTED (20)
.

VARIABLE LABELS
...
.

VALUE LABELS
...
.

MISSING VALUES
A001 A002 A003 A004 A005 A101 A102 A105 A106 A108 (-9,-8)
A103_01 A103_02 A103_03 A104_01 A104_02 A104_03 A104_04 A104_05 A107_01
A107_02 A109_01 A109_02 A109_03 A110_01 A110_02 A110_03 A110_04 A111_01
A111_02 A111_03 A111_04 A112_01 A112_02 A112_03 A112_04 A112_05 (-8)
.

-----8<------8<------8<------

I only pasted on line of data as a sample and omitted the labels if that's ok. Other than that, that's my whole file. The file has been generated/exported for me by http://www.soscisurvey.de – a free platform for scientific surveys.

HTH
Andy

Andreas Lappe <crazynd>
Thu 12 Aug 2010 04:55:04 AM UTC, comment #3:

>I pasted the combined syntax+data-file from my survey into a new syntax window and selected run->all. This brought up:


OK. What was in the syntax window when the error occurred? If you could cut-and-paste the contents of that window, or at least the DATA LIST command, it will allow us to help you.

Ben Pfaff <blp>
Project Administrator
Mon 09 Aug 2010 09:10:09 AM UTC, comment #2:

I'm not sure if I can provide the appropriate aswers as I'm completely new to both SPSS and PSPP and I'm not used to write syntax either.

I pasted the combined syntax+data-file from my survey into a new syntax window and selected run->all. This brought up:

The error is: Syntax1:12: syntax error: Input format DATETIME0.0
specifies width 0, but DATETIME requires a width between 17 and 40.

When changed to DATETIME20 (John Darrington helped me with that) it still brought up the following:

Syntax1:70: data file warning: (columns 33-32, DATETIME field) Syntax error in date field.
Syntax1:71: data file warning: (columns 33-32, DATETIME field) Syntax error in date field.
Syntax1:72: data file warning: (columns 36-35, DATETIME field) Syntax error in date field.
Syntax1:73: data file warning: (columns 3-2, F field) Field contents are not numeric.
Syntax1:73: data file warning: (columns 36-35, F field) Field contents are not numeric.
Syntax1:73: data file warning: (columns 62-61, DATETIME field) Delimiter expected between fields in date.
Syntax1:73: data file warning: (columns 71-70, F field) Field contents are not numeric.

The gui tells me there are 1770 messages in total, it displays 110 and I just selected the first seven of them above.

Even though these messages come up, it loads them but the fields are wrong (as in every line has a offset).

That's where I switched to SPSS-demo, imported the file, wrote a .sav and imported that into PSPP. Worked fine.

To your other questions: It is a DATA LIST FREE(TAB) and one line out of it looks like that (I replaced Tabs my ' \t ' to make the list a bit more readable in this webview):

1 \t \t \t 11 \t surveyname \t interview \t 24-07-2010 14:22:05 \t 1 \t 2 \t 3 \t 2 \t 3 \t \t 2 \t \t 1 \t 1 \t 2 \t 2 \t 1 \t \t \t \t \t \t \t \t 1 \t 1 \t 2 \t 1 \t 3 \t 2 \t 2 \t 1 \t \t \t \t \t \t \t \t \t \t \t \t 1 \t 2 \t 2 \t 1 \t 1 \t \t

I hope that helps... if you need more informations, tell me.
All this was happening in PSPP 0.6.2 on Ubuntu (straight from repository).

For performance reasons I left the vm out now and build PSPP via Macports, which brought up some more problems but with the .sav file it works fine.

Andreas Lappe <crazynd>
Sun 08 Aug 2010 08:37:40 PM UTC, comment #1:

Thank you for the report. Can you give a little more detail? What is the command on which the former fails and the latter works? I guess that it is DATA LIST. If so, then is DATA LIST being used in FIXED, FREE, or LIST mode?

Ben Pfaff <blp>
Project Administrator
Sun 08 Aug 2010 06:47:57 PM UTC, original submission:

Fails:

STARTED (DATETIME)

Works:

STARTED (DATETIME20)

My DATETIME entry is:

24-07-2010 14:22:05

if that's not quoted it fails.

SPSS imports all that without problems (tested with version 17).

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by crazynd (Posted a comment)
  • -unavailable- added by blp (Posted a comment)
  • -unavailable- added by blp (reporter)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sun 25 Nov 2012 01:50:59 AM UTCblpStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sat 14 May 2011 04:48:16 AM UTCblpReleaseNone=>Before 0.8.0
    Fri 13 Aug 2010 04:20:28 PM UTCblpAttached File-=>Added Screen shot 2010-08-13 at 07.57.15.png, #21212
    Sun 08 Aug 2010 08:37:40 PM UTCblpCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup