SPSS Statistics

SPSS Statistics

Your hub for statistical analysis, data management, and data documentation. Connect, learn, and share with your peers! 

 View Only
Expand all | Collapse all

Warning #294

  • 1.  Warning #294

    Posted Fri March 17, 2023 04:15 PM
    Edited by Portia Melita Mon March 20, 2023 09:28 AM

    Hello,

    I use SPSS Version 28.0.0.0. When I want to import data, I get the warning #294 "Inline data are limited to 1024 bytes per line; any data past that limit will be truncated". What is that supposed to mean? I thought it would mean that long text comments are truncated. But when I look at the data, everything seems to be fine. Even long comments / answers in the free text fields are fully readable. So what does SPSS wants to tell me with that warning message #294? 

    I would be very, very grateful, if someone can help me!



    ------------------------------

    Lex
    ------------------------------



  • 2.  RE: Warning #294

    Posted Tue March 21, 2023 02:52 PM

    Hi @Lex
    You don't say what format you are importing from, or what command syntax you are using to accomplish the task.  In the absence of more information, I would take the Warning literally: No record to be read can exceed 1024 bytes.  I doubt it refers specifically to your string (text) fields, but rather to the row of text that you are reading.  Check to see that you are getting valid data for all of the variables you expect to have read.

    For example, you know in your heart the file you are reading has 50 fields/columns of data.  Yet when you look at the data in the IBM SPSS Statistics Data Editor window, you only see 39 fields.  This would indicate that variables 40-50 were truncated from the file as read.

    I hope this helps!



    ------------------------------
    David Dwyer
    SPSS Technical Support
    IBM Software
    ------------------------------



  • 3.  RE: Warning #294

    Posted Tue March 21, 2023 03:45 PM
    Edited by Anonymous User Tue March 21, 2023 04:53 PM

    Hi!

    Thank you very much for the message!

    The warning message appears when I use "DATA LIST" and it refers to the command "BEGIN DATA".

    After I checked everything, I'm sure that the message refers to the length / capacity of a row in the syntax editor. Here I got a very long comment in one row. And this comment is indeed truncated in the data editor after exactly 1,024 bytes (=1,007 characters). It seems then whenever a row in the syntax editor exceeds 1,024 bytes it will be truncated (in the data editor). Right?

    In the data editor, all variables (columns) and all cases are available / shown. I checked it: Nothing is missing / wrong. Only that one long comment is truncated after 1,024 bytes (=1,007 characters). Apart from that truncated comment all the values and all variables for that case and all the other cases are complete, valid and correct. 

    I wonder why SPSS doesn't tell me the specific row(s) where something is truncated (because it was demanding and time consuming to find that out and to check everything). And an explanation of the warning would have been helpful als well. Is there no guide / handbook / overview of warning messages and their meaning available? I mean, it should be possible to find some kind of explanation (or more details) for a warning message.

    Lex



    ------------------------------
    Lex
    ------------------------------



  • 4.  RE: Warning #294

    Posted Tue March 21, 2023 06:21 PM
    Edited by David Dwyer Tue March 21, 2023 06:21 PM

    Hi @9Anime Legendsofvalhalla

    I'm glad you found your answer.  I suspect you found more to it than you relate above.  
    Here is my example:


    DATA LIST FREE/id (F1) text (A3).
    BEGIN DATA
    1 top
    2 bottom

    >Warning # 1115
    >The input text was too long.  It has been truncated.
    >Command line: 246  Current case: 2  Current splitfile group: 1
    >Field contents: 'bottom'
    >Record number: 2  Starting column: 3  Record length: 8

    3 I
    END DATA.
    LIST.

    I was never able to replicate Warning #294 using DATA LIST, DATA LIST FIXED, DATA LIST FREE, or DATA LIST LIST.  Under DATA LIST and DATA LIST FIXED, my values were just silently truncated.

    The user interface no longer produces the DATA LIST command syntax.  So you would be left to the SPSS Statistics Command Syntax Reference Guide  to track that warning and the caveats associated with the DATA LIST command.



    ------------------------------
    David Dwyer
    SPSS Technical Support
    IBM Software
    ------------------------------



  • 5.  RE: Warning #294

    Posted Tue March 21, 2023 06:53 PM
    Edited by Anonymous User Wed March 22, 2023 02:20 AM
    Hello again! I don't know what you mean by "found out more than I relate above". Do you refer to the warning text? Maybe it is easier to understand by showing you the warning message itself. As you can see in that image, this is the syntax editor, the DATA LIST command (left) and the warning message (below) for BEGIN DATA. The text is in german but it doesn't say more than: "Inline data are limited to 1024 bytes per line; any data past that limit will be truncated. Consider moving the inline data to an external file and using DATA LIST FILE=<path/file> to avoid any possible data loss." (just like it is mentioned here: https://www.ibm.com/docs/en/spss-statistics/28.0.0?topic=list-overview-data-command).
     Actually, I just want to know if my discovery is correct: that the warning messages refers to the length of a row in the syntax editor and that data that exceed the limitation of 1,024 bytes per row will be truncated when shown in the data editor. Is that right? 



    ------------------------------
    Lex
    ------------------------------



  • 6.  RE: Warning #294

    Posted Fri March 24, 2023 02:54 PM
    Edited by Anonymous User Fri March 24, 2023 02:55 PM

    I am sorry for being noisy. But I would be really grateful, if someone can answer that question above: Is it right, that the warning message ("Inline data are limited to 1024 bytes per line; any data past that limit will be truncated") using DATA LIST refers to the length of a row in the syntax editor and tells me that if there is a row that exceeds 1,024 bytes then it will be truncated when imported to the data editor?



    ------------------------------
    Lex
    ------------------------------



  • 7.  RE: Warning #294

    Posted Fri March 24, 2023 02:57 PM

    Sorry, I lost sight of this.

    Yes, it is a syntax-related error.



    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 8.  RE: Warning #294

    Posted Fri March 24, 2023 03:12 PM

    This might be the end of my worries, so thank you from the bottom of my heart!!

    So just one example to be really sure: I have one case who answered one question with a very long text comment. In the syntax editor, this comment is fully shown in one row - and this row exceeds those 1,024 bytes. When importing the data using DATA LIST, that comment (=row in the syntax editor) is truncated. Therefore, I can see all cases and all answers fully and correctly - except for that one comment which was truncated (after 1,024 bytes).

    Am I right?

    Sorry, but I hope this is my last question!



    ------------------------------
    Lex
    ------------------------------



  • 9.  RE: Warning #294

    Posted Fri March 24, 2023 03:15 PM
    Bear in mind that an accented or non-western character may take 2 or even 3 bytes, and the 1024 limit applies to bytes, not characters

    --





  • 10.  RE: Warning #294

    Posted Fri March 24, 2023 03:16 PM
    Edited by Rick Marcantonio Fri March 24, 2023 03:16 PM

    Right. You can avoid this error (or warning) by putting the data into a file and using FILE HANDLE with LRECL to tell SPSS that some line or lines exceed 1024.

    See here for details.



    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 11.  RE: Warning #294

    Posted Fri March 24, 2023 03:19 PM
    I think that the maximum record length for text in an external file was increased to 8K some time ago, so LRECL would only be needed if the line is longer than that.

    --





  • 12.  RE: Warning #294

    Posted Fri March 24, 2023 03:21 PM
    Probably. I forgot. FILE HANDLE will help him, in any event.





  • 13.  RE: Warning #294

    Posted Fri March 24, 2023 03:28 PM

    OMG, thank you!! I can live with one long text comment (it is indeed only one) being truncated. I just wanted to make sure that this is the only effect and that all the other data is not affected. Thank you so much for confirming that! I am so, so relieved to hear that!



    ------------------------------
    Lex
    ------------------------------



  • 14.  RE: Warning #294

    Posted Fri March 24, 2023 05:38 PM
      |   view attached

    Hi @Lex,

    I don't know that FILE HANDLE will help, but it certainly won't hurt.  It's been bugging me that you originally asked for references and I haven't offered you any.  So here are a few.

    The full warning is:

    >Warning # 294
    >Inline data are limited to 1024 bytes per line; any data past that limit will
    >be truncated.  Please consider moving the inline data to an external file and
    >using FILE=<path/file> to avoid any possible data loss.
    (emphasis added)

    The limit on a single line of inline data is 80 columns . This is clearly a documentation defect, as I see in IBM SPSS Statistics 29.0.1.0. (not yet released) the warning is saying 1024.  I'll file that.

    The limit on a string field is 32,767 bytes

    I've been able to use both DATA LIST FILE and GET DATA /TYPE=TXT /FILE= "..." /ARRANGEMENT=FIXED to read string fields as wide as 32767 characters from an external file.

    Here is an example for you:



    ------------------------------
    David Dwyer
    SPSS Technical Support
    IBM Software
    ------------------------------

    Attachment(s)

    zip
    Lex.zip   408 KB 1 version


  • 15.  RE: Warning #294

    Posted Sat March 25, 2023 02:20 AM
    Edited by Anonymous User Sat March 25, 2023 02:21 AM

    Thank you very much for the references!

    What do you mean by „The limit on a single line of inline data is 80 columns. This is clearly a documentation defect, as I see in IBM SPSS Statistics 29.0.1.0. (not yet released) the warning is saying 1024.  I'll file that." ?

    Is one of the numbers (80 oder 1024) wrong? Should data be truncated after 80 digits (instead of 1024)? I have many lines in the syntax editor that are longer and they are not truncated.

    What I can observe is this: When I want to use DATA LIST, I can see the syntax editor. Here, all of my cases with all values (answers) are shown. (Every case needs more than one line in the syntax editor to be shown. But in the data editor, every case is one row. So for example Case 60 needs 3 lines in the syntax editor but 1 row in the data editor).

    I suppose that I can use DATA LIST (and avoid FILE HANDLE; I prefer not to use it) to import all data in the data editor. And following the explanations of @Rick Marcantonio, I was sure that all data is correctly and fully imported and shown in the data editor (all cases, all answers and all answers are correctly assigned to their variables and cases). And that only that one comment is truncated (and that's no problem at all).

    Is that so?? Or not?

    (Sorry, I thought that I finally understood, but the remark with the documentation defect and 80 columns is confusing me).



    ------------------------------
    Lex
    ------------------------------



  • 16.  RE: Warning #294

    Posted Mon April 03, 2023 11:17 AM

    My private inbox does not allow me to respond, so I am responding here:

    You are right on all counts. SPSS will truncate any inline data > 1024. You will get a warning very much like this:
     
    >Warning # 294>Inline data are limited to 1024 bytes per line; any data past that limit will>be truncated.  Please consider moving the inline data to an external file and>using FILE=<path/file> to avoid any possible data loss.  


    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------



  • 17.  RE: Warning #294

    Posted Mon April 03, 2023 12:29 PM

    Mr. Marcantonio - I can not tell you how grateful I am for your response!
    Your last post is the answer to a message I had sent to you directly.
    Shall I copy that message here to make it visible for the community? Or is this not common?

     



    ------------------------------
    Lex
    ------------------------------



  • 18.  RE: Warning #294

    Posted Mon April 03, 2023 12:30 PM

    No. No need. Glad to have been of help.



    ------------------------------
    Rick Marcantonio
    Quality Assurance
    IBM
    ------------------------------