Discussion:
SPSS GET DATA Error 2265
(too old to reply)
j***@gmail.com
2017-04-12 19:06:34 UTC
Permalink
Hello,

I am trying to import a large text file and I am getting an error which has me baffled. I've looked at countless posts and tried different things, but keep getting the same error. Hoping an external pair of eyes can help solve this. I'm using SPSS V22 and operating in Windows 7 Enterprise.

Thanks,
Julie

GET DATA /TYPE = TXT
/FILE = 'P:\Data\EDOIdec27.txt'
/FIXCASE = 1
/ARRANGEMENT = FIXED
/FIRSTCASE = 1
/IMPORTCASE = ALL
/VARIABLES =
/ENTNUM 0-9 F10.0
LEGNAME 10-73 A64
OPNAME 74-137 A64
STREET 138-201 A64
CITY 202-233 A32
OPPROV 234-235 A2
OPPCODE 236-241 A6
NAICS 242-247 F6.0
EMP8 248-249 F2.0
EMP12 250-251 F2.0
PROV 252-253 A2
CD 254-255 F2.0
CSD 256-258 F3.0
CACMA 259-261 F3.0
ER 262-263 F2.0
STATTYP 264-264 F1.0.
Error. Command name: GET DATA
(2265) Unrecognized or invalid variable format. The format is invalid. For
numeric formats, the width or decimals value may be invalid.
Execution of this command stops.
CACHE.
EXECUTE.
Error # 105. Command name: EXECUTE
This command is not valid before a working file has been defined.
Execution of this command stops.
Rich Ulrich
2017-04-13 00:21:42 UTC
Permalink
Post by j***@gmail.com
Hello,
I am trying to import a large text file and I am getting an error which has me baffled. I've looked at countless posts and tried different things, but keep getting the same error. Hoping an external pair of eyes can help solve this. I'm using SPSS V22 and operating in Windows 7 Enterprise.
There is no column "0" in SPSS data, so your first set of variable
must be defined as being in 1-10, not 0-9. Add 1 to everything.

I learned to indent all continuation lines, but that probably doesn't
matter any more.
Post by j***@gmail.com
Thanks,
Julie
GET DATA /TYPE = TXT
/FILE = 'P:\Data\EDOIdec27.txt'
/FIXCASE = 1
/ARRANGEMENT = FIXED
/FIRSTCASE = 1
/IMPORTCASE = ALL
/VARIABLES =
/ENTNUM 0-9 F10.0
LEGNAME 10-73 A64
...
--
Rich Ulrich
j***@gmail.com
2017-04-13 12:01:20 UTC
Permalink
Thanks Rich. I did try that but it still didn't work.

GET DATA /TYPE = TXT
/FILE = 'P:\Data\EDOIdec27.txt'
/FIXCASE = 1
/ARRANGEMENT = FIXED
/FIRSTCASE = 1
/IMPORTCASE = ALL
/VARIABLES =
/ENTNUM 1-9 F9.0
LEGNAME 10-73 A64
OPNAME 74-137 A64
STREET 138-201 A64
CITY 202-233 A32
OPPROV 234-235 A2
OPPCODE 236-241 A6
NAICS 242-247 F6.0
EMP8 248-249 F2.0
EMP12 250-251 F2.0
PROV 252-253 A2
CD 254-255 F2.0
CSD 256-258 F3.0
CACMA 259-261 F3.0
ER 262-263 F2.0
STATTYP 264-264 F1.0.
Error. Command name: GET DATA
(2265) Unrecognized or invalid variable format. The format is invalid. For
numeric formats, the width or decimals value may be invalid.
Execution of this command stops.
CACHE.
EXECUTE.
Error # 105. Command name: EXECUTE
This command is not valid before a working file has been defined.
Execution of this command stops.
j***@gmail.com
2017-04-13 14:10:32 UTC
Permalink
OK I got it to work by removing the backslash in front of the first variable name (ENTNUM). Just wanted to share in case anyone else gets stuck with a similar issue.
h***@gmail.com
2019-01-24 20:02:35 UTC
Permalink
Post by j***@gmail.com
Hello,
I am trying to import a large text file and I am getting an error which has me baffled. I've looked at countless posts and tried different things, but keep getting the same error. Hoping an external pair of eyes can help solve this. I'm using SPSS V22 and operating in Windows 7 Enterprise.
Thanks,
Julie
GET DATA /TYPE = TXT
/FILE = 'P:\Data\EDOIdec27.txt'
/FIXCASE = 1
/ARRANGEMENT = FIXED
/FIRSTCASE = 1
/IMPORTCASE = ALL
/VARIABLES =
/ENTNUM 0-9 F10.0
LEGNAME 10-73 A64
OPNAME 74-137 A64
STREET 138-201 A64
CITY 202-233 A32
OPPROV 234-235 A2
OPPCODE 236-241 A6
NAICS 242-247 F6.0
EMP8 248-249 F2.0
EMP12 250-251 F2.0
PROV 252-253 A2
CD 254-255 F2.0
CSD 256-258 F3.0
CACMA 259-261 F3.0
ER 262-263 F2.0
STATTYP 264-264 F1.0.
Error. Command name: GET DATA
(2265) Unrecognized or invalid variable format. The format is invalid. For
numeric formats, the width or decimals value may be invalid.
Execution of this command stops.
CACHE.
EXECUTE.
Error # 105. Command name: EXECUTE
This command is not valid before a working file has been defined.
Execution of this command stops.
Hi all,

I am a SPSS newbie. I've got an unrecognized or invalid variable format error (2265) when trying to run this code
GET DATA
/TYPE = TXT
/FILE = 'R:\Response.csv'
/DELCASE = LINE
/DELIMITERS = ","
/FIRSTCASE = 2
/IMPORTCASE = ALL
/VARIABLES =
VAR_RespID F20.0
VAR_dvol(31827) F20.0
VAR_dvol(31828) F20.0
VAR_dvol(31829) F20.0
VAR_dvol(31830) F20.0
.

EXECUTE .

Any ideas how to fix it. Thanks.
Bruce Weaver
2019-01-24 21:10:51 UTC
Permalink
Post by h***@gmail.com
Post by j***@gmail.com
Hello,
I am trying to import a large text file and I am getting an error which has me baffled. I've looked at countless posts and tried different things, but keep getting the same error. Hoping an external pair of eyes can help solve this. I'm using SPSS V22 and operating in Windows 7 Enterprise.
Thanks,
Julie
GET DATA /TYPE = TXT
/FILE = 'P:\Data\EDOIdec27.txt'
/FIXCASE = 1
/ARRANGEMENT = FIXED
/FIRSTCASE = 1
/IMPORTCASE = ALL
/VARIABLES =
/ENTNUM 0-9 F10.0
LEGNAME 10-73 A64
OPNAME 74-137 A64
STREET 138-201 A64
CITY 202-233 A32
OPPROV 234-235 A2
OPPCODE 236-241 A6
NAICS 242-247 F6.0
EMP8 248-249 F2.0
EMP12 250-251 F2.0
PROV 252-253 A2
CD 254-255 F2.0
CSD 256-258 F3.0
CACMA 259-261 F3.0
ER 262-263 F2.0
STATTYP 264-264 F1.0.
Error. Command name: GET DATA
(2265) Unrecognized or invalid variable format. The format is invalid. For
numeric formats, the width or decimals value may be invalid.
Execution of this command stops.
CACHE.
EXECUTE.
Error # 105. Command name: EXECUTE
This command is not valid before a working file has been defined.
Execution of this command stops.
Hi all,
I am a SPSS newbie. I've got an unrecognized or invalid variable format error (2265) when trying to run this code
GET DATA
/TYPE = TXT
/FILE = 'R:\Response.csv'
/DELCASE = LINE
/DELIMITERS = ","
/FIRSTCASE = 2
/IMPORTCASE = ALL
/VARIABLES =
VAR_RespID F20.0
VAR_dvol(31827) F20.0
VAR_dvol(31828) F20.0
VAR_dvol(31829) F20.0
VAR_dvol(31830) F20.0
.
EXECUTE .
Any ideas how to fix it. Thanks.
Parentheses are not legal characters in variable names. See the Universals section of the Command Syntax Reference manual.

https://www.ibm.com/support/knowledgecenter/en/SSLVMB_25.0.0/statistics_reference_project_ddita/spss/base/syn_variables_variable_names.html

If you change the offending variable names to something like the following, it will likely work.

dvol_31827 F20.0
dvol_31828 F20.0
dvol_31829 F20.0
dvol_31830 F20.0

I removed the leading VAR_ because it seems unnecessary (assuming it stands for variable).
Loading...