Hi there,
I'm new to SPSS. I'm trying to read in some data from a text file using the "File -> Read Text Data..." menu option. I've tried importing files which are in both CSV and fixed-width formats. Both produce the same error, listed below: GET DATA /TYPE=TXT /FILE='C:\tkresolver\stats-data-2011-02-23.txt' /DELCASE=LINE /DELIMITERS="," /ARRANGEMENT=DELIMITED /FIRSTCASE=1 /IMPORTCASE=ALL /VARIABLES= V1 F24.21 V2 F24.22 V3 F24.22 V4 F24.22 V5 F24.22 V6 F25.22 V7 F25.22 V8 F24.21. >Error. Command name: GET DATA >(2265) Unrecognized or invalid variable definition. >This command not executed. GET DATA /TYPE=TXT /FILE='C:\tkresolver\stats-data-2011-02-24-3-nohead.txt' /FIXCASE=1 /ARRANGEMENT=FIXED /FIRSTCASE=1 /IMPORTCASE=ALL /VARIABLES= /1 V1 0-25 F26.21 V2 26-51 F26.22 V3 52-77 F26.22 V4 78-103 F26.22 V5 104-129 F26.22 V6 130-155 F26.22 V7 156-181 F26.22 V8 182-207 F26.21. >Error. Command name: GET DATA >(2265) Unrecognized or invalid variable definition. >This command not executed. I've exactly followed the instructions in SPSS's help file on how to import a text file but I still get these errors. Can anyone help me determine the problem? Many thanks, Bob Ham -- Bob Ham <[hidden email]> for (;;) { ++pancakes; } ===================== 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 |
You have too many decimal places in the
formats. 16 is the max, I think. Floating point hardware allows
only about 16.5 significant figures. Explicit decimals will override
any implied setting.
Jon Peck Senior Software Engineer, IBM [hidden email] 312-651-3435 From: Bob Ham <[hidden email]> To: [hidden email] Date: 02/24/2011 06:43 AM Subject: [SPSSX-L] Error "(2265) Unrecognized or invalid variable definition" while reading text file Sent by: "SPSSX(r) Discussion" <[hidden email]> Hi there, I'm new to SPSS. I'm trying to read in some data from a text file using the "File -> Read Text Data..." menu option. I've tried importing files which are in both CSV and fixed-width formats. Both produce the same error, listed below: GET DATA /TYPE=TXT /FILE='C:\tkresolver\stats-data-2011-02-23.txt' /DELCASE=LINE /DELIMITERS="," /ARRANGEMENT=DELIMITED /FIRSTCASE=1 /IMPORTCASE=ALL /VARIABLES= V1 F24.21 V2 F24.22 V3 F24.22 V4 F24.22 V5 F24.22 V6 F25.22 V7 F25.22 V8 F24.21. >Error. Command name: GET DATA >(2265) Unrecognized or invalid variable definition. >This command not executed. GET DATA /TYPE=TXT /FILE='C:\tkresolver\stats-data-2011-02-24-3-nohead.txt' /FIXCASE=1 /ARRANGEMENT=FIXED /FIRSTCASE=1 /IMPORTCASE=ALL /VARIABLES= /1 V1 0-25 F26.21 V2 26-51 F26.22 V3 52-77 F26.22 V4 78-103 F26.22 V5 104-129 F26.22 V6 130-155 F26.22 V7 156-181 F26.22 V8 182-207 F26.21. >Error. Command name: GET DATA >(2265) Unrecognized or invalid variable definition. >This command not executed. I've exactly followed the instructions in SPSS's help file on how to import a text file but I still get these errors. Can anyone help me determine the problem? Many thanks, Bob Ham -- Bob Ham <[hidden email]> for (;;) { ++pancakes; } ===================== 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 |
I see. I've looked at the documentation for GET DATA variable data
types and it doesn't seem to mention any limits. Is this maximum documented anywhere? On Thu, 2011-02-24 at 07:12 -0700, Jon K Peck wrote: > You have too many decimal places in the formats. 16 is the max, I > think. Floating point hardware allows only about 16.5 significant > figures. Explicit decimals will override any implied setting. > > Jon Peck > Senior Software Engineer, IBM > [hidden email] > 312-651-3435 > > > > From: Bob Ham <[hidden email]> > To: [hidden email] > Date: 02/24/2011 06:43 AM > Subject: [SPSSX-L] Error "(2265) Unrecognized or invalid > variable definition" while reading text > file > Sent by: "SPSSX(r) Discussion" <[hidden email]> > > ______________________________________________________________________ > > > > Hi there, > > I'm new to SPSS. I'm trying to read in some data from a text file > using > the "File -> Read Text Data..." menu option. I've tried importing > files > which are in both CSV and fixed-width formats. Both produce the same > error, listed below: > > GET DATA > /TYPE=TXT > /FILE='C:\tkresolver\stats-data-2011-02-23.txt' > /DELCASE=LINE > /DELIMITERS="," > /ARRANGEMENT=DELIMITED > /FIRSTCASE=1 > /IMPORTCASE=ALL > /VARIABLES= > V1 F24.21 > V2 F24.22 > V3 F24.22 > V4 F24.22 > V5 F24.22 > V6 F25.22 > V7 F25.22 > V8 F24.21. > > >Error. Command name: GET DATA > >(2265) Unrecognized or invalid variable definition. > >This command not executed. > > > GET DATA > /TYPE=TXT > /FILE='C:\tkresolver\stats-data-2011-02-24-3-nohead.txt' > /FIXCASE=1 > /ARRANGEMENT=FIXED > /FIRSTCASE=1 > /IMPORTCASE=ALL > /VARIABLES= > /1 V1 0-25 F26.21 > V2 26-51 F26.22 > V3 52-77 F26.22 > V4 78-103 F26.22 > V5 104-129 F26.22 > V6 130-155 F26.22 > V7 156-181 F26.22 > V8 182-207 F26.21. > > >Error. Command name: GET DATA > >(2265) Unrecognized or invalid variable definition. > >This command not executed. > > > I've exactly followed the instructions in SPSS's help file on how to > import a text file but I still get these errors. > > Can anyone help me determine the problem? > > Many thanks, > > Bob Ham > > -- > Bob Ham <[hidden email]> > > for (;;) { ++pancakes; } > > ===================== > 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 > -- Bob Ham <[hidden email]> for (;;) { ++pancakes; } ===================== 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 |
It is not specific to GET DATA. Try
this.
data list free /x (f40.25). begin data 1 2 3 end data. exec. You get this message, which is clearer than the equivalent issued by GET DATA. Error # 1009 in column 20. Text: f40.25 The number of decimal digits exceeds the maximum number allowed for the specified format code This is documented in the Command Syntax Reference in Universals under Numeric Variable Formats For all numeric formats, the maximum width is 40. For numeric formats where decimals are allowed, the maximum number of decimals is 16. Jon Peck Senior Software Engineer, IBM [hidden email] 312-651-3435 From: Bob Ham <[hidden email]> To: [hidden email] Date: 02/24/2011 08:08 AM Subject: Re: [SPSSX-L] Error "(2265) Unrecognized or invalid variable definition" while reading text file Sent by: "SPSSX(r) Discussion" <[hidden email]> I see. I've looked at the documentation for GET DATA variable data types and it doesn't seem to mention any limits. Is this maximum documented anywhere? On Thu, 2011-02-24 at 07:12 -0700, Jon K Peck wrote: > You have too many decimal places in the formats. 16 is the max, I > think. Floating point hardware allows only about 16.5 significant > figures. Explicit decimals will override any implied setting. > > Jon Peck > Senior Software Engineer, IBM > [hidden email] > 312-651-3435 > > > > From: Bob Ham <[hidden email]> > To: [hidden email] > Date: 02/24/2011 06:43 AM > Subject: [SPSSX-L] Error "(2265) Unrecognized or invalid > variable definition" while reading text > file > Sent by: "SPSSX(r) Discussion" <[hidden email]> > > ______________________________________________________________________ > > > > Hi there, > > I'm new to SPSS. I'm trying to read in some data from a text file > using > the "File -> Read Text Data..." menu option. I've tried importing > files > which are in both CSV and fixed-width formats. Both produce the same > error, listed below: > > GET DATA > /TYPE=TXT > /FILE='C:\tkresolver\stats-data-2011-02-23.txt' > /DELCASE=LINE > /DELIMITERS="," > /ARRANGEMENT=DELIMITED > /FIRSTCASE=1 > /IMPORTCASE=ALL > /VARIABLES= > V1 F24.21 > V2 F24.22 > V3 F24.22 > V4 F24.22 > V5 F24.22 > V6 F25.22 > V7 F25.22 > V8 F24.21. > > >Error. Command name: GET DATA > >(2265) Unrecognized or invalid variable definition. > >This command not executed. > > > GET DATA > /TYPE=TXT > /FILE='C:\tkresolver\stats-data-2011-02-24-3-nohead.txt' > /FIXCASE=1 > /ARRANGEMENT=FIXED > /FIRSTCASE=1 > /IMPORTCASE=ALL > /VARIABLES= > /1 V1 0-25 F26.21 > V2 26-51 F26.22 > V3 52-77 F26.22 > V4 78-103 F26.22 > V5 104-129 F26.22 > V6 130-155 F26.22 > V7 156-181 F26.22 > V8 182-207 F26.21. > > >Error. Command name: GET DATA > >(2265) Unrecognized or invalid variable definition. > >This command not executed. > > > I've exactly followed the instructions in SPSS's help file on how to > import a text file but I still get these errors. > > Can anyone help me determine the problem? > > Many thanks, > > Bob Ham > > -- > Bob Ham <[hidden email]> > > for (;;) { ++pancakes; } > > ===================== > 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 > -- Bob Ham <[hidden email]> for (;;) { ++pancakes; } ===================== 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 |
You must have a different Command Syntax Reference to one I'm looking at
as I searched for that text and it isn't in my document. Regardless, reducing the precision of the numbers has done the job, thanks. On Thu, 2011-02-24 at 08:21 -0700, Jon K Peck wrote: > It is not specific to GET DATA. Try this. > data list free /x (f40.25). > begin data > 1 > 2 > 3 > end data. > exec. > > You get this message, which is clearer than the equivalent issued by > GET DATA. > > Error # 1009 in column 20. Text: f40.25 > The number of decimal digits exceeds the maximum number allowed for > the > specified format code > > > This is documented in the Command Syntax Reference in Universals under > Numeric Variable Formats > For all numeric formats, the maximum width is 40. > For numeric formats where decimals are allowed, the maximum number > of decimals is 16. > > > Jon Peck > Senior Software Engineer, IBM > [hidden email] > 312-651-3435 > > > > From: Bob Ham <[hidden email]> > To: [hidden email] > Date: 02/24/2011 08:08 AM > Subject: Re: [SPSSX-L] Error "(2265) Unrecognized or invalid > variable definition" while > reading text file > Sent by: "SPSSX(r) Discussion" <[hidden email]> > > ______________________________________________________________________ > > > > I see. I've looked at the documentation for GET DATA variable data > types and it doesn't seem to mention any limits. Is this maximum > documented anywhere? > > > On Thu, 2011-02-24 at 07:12 -0700, Jon K Peck wrote: > > You have too many decimal places in the formats. 16 is the max, I > > think. Floating point hardware allows only about 16.5 significant > > figures. Explicit decimals will override any implied setting. > > > > Jon Peck > > Senior Software Engineer, IBM > > [hidden email] > > 312-651-3435 > > > > > > > > From: Bob Ham <[hidden email]> > > To: [hidden email] > > Date: 02/24/2011 06:43 AM > > Subject: [SPSSX-L] Error "(2265) Unrecognized or invalid > > variable definition" while reading text > > file > > Sent by: "SPSSX(r) Discussion" <[hidden email]> > > > > > ______________________________________________________________________ > > > > > > > > Hi there, > > > > I'm new to SPSS. I'm trying to read in some data from a text file > > using > > the "File -> Read Text Data..." menu option. I've tried importing > > files > > which are in both CSV and fixed-width formats. Both produce the > same > > error, listed below: > > > > GET DATA > > /TYPE=TXT > > /FILE='C:\tkresolver\stats-data-2011-02-23.txt' > > /DELCASE=LINE > > /DELIMITERS="," > > /ARRANGEMENT=DELIMITED > > /FIRSTCASE=1 > > /IMPORTCASE=ALL > > /VARIABLES= > > V1 F24.21 > > V2 F24.22 > > V3 F24.22 > > V4 F24.22 > > V5 F24.22 > > V6 F25.22 > > V7 F25.22 > > V8 F24.21. > > > > >Error. Command name: GET DATA > > >(2265) Unrecognized or invalid variable definition. > > >This command not executed. > > > > > > GET DATA > > /TYPE=TXT > > /FILE='C:\tkresolver\stats-data-2011-02-24-3-nohead.txt' > > /FIXCASE=1 > > /ARRANGEMENT=FIXED > > /FIRSTCASE=1 > > /IMPORTCASE=ALL > > /VARIABLES= > > /1 V1 0-25 F26.21 > > V2 26-51 F26.22 > > V3 52-77 F26.22 > > V4 78-103 F26.22 > > V5 104-129 F26.22 > > V6 130-155 F26.22 > > V7 156-181 F26.22 > > V8 182-207 F26.21. > > > > >Error. Command name: GET DATA > > >(2265) Unrecognized or invalid variable definition. > > >This command not executed. > > > > > > I've exactly followed the instructions in SPSS's help file on how to > > import a text file but I still get these errors. > > > > Can anyone help me determine the problem? > > > > Many thanks, > > > > Bob Ham > > > > -- > > Bob Ham <[hidden email]> > > > > for (;;) { ++pancakes; } > > > > ===================== > > 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 > > > > -- > Bob Ham <[hidden email]> > > for (;;) { ++pancakes; } > > ===================== > 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 > -- Bob Ham <[hidden email]> for (;;) { ++pancakes; } ===================== 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 |
Free forum by Nabble | Edit this page |