This post was updated on .
Hi I am trying to make a SPSS file from .dat file using below syntax but is giving error. Please help
FILE HANDLE dataASC /RECFORM=FIXED /LRECL=30000 /NAME="C:\65111_data.dat". * The name in the previous line must include the full path to the data file, please amend as necessary. DATA LIST FILE=dataASC FIXED / responseid 1-8(F) respid 9-16(F) s1 17-17(F) s2a 18-20(F) hid_s2b 21-22(F) hid_ageRecode 23-23(F). exe. >Error # 4130 in column 1024. Text: (End of Command) >The DATA LIST command contains an invalid format. >Execution of this command stops. |
The syntax is hard to follow because of the line wrapping, but the DATA LIST command is okay. You should get a table like this after it is parsed. Variable Rec Start End Format responseid 1 1 8 F8.0 respid 1 9 16 F8.0 s1 1 17 17 F1.0 s2a 1 18 20 F3.0 hid_s2b 1 21 22 F2.0 hid_ageRecode 1 23 23 F1.0 However, the big clue is that the error message refers to column 1024, so there is something wrong with the line termination. I suspect that the line ending is not recognized by Statistics so later lines are being combined with the DATA LIST syntax. Statistics recognizes most typical terminators, but the exact behavior may vary by platform. Also if this is being read via an INCLUDE or INSERT command, check the line endings there. On Sat, Apr 30, 2016 at 1:37 PM, Kunal <[hidden email]> wrote: Hi I am trying to make a SPSS file from .dat file using below syntax but is giving error. Please help FILE HANDLE dataASC /RECFORM=FIXED /LRECL=30000 /NAME="C:\65111_data.dat". * The name in the previous line must include the full path to the data file, please amend as necessary. DATA LIST FILE=dataASC FIXED / responseid 1-8(F) respid 9-16(F) s1 17-17(F) s2a 18-20(F) hid_s2b 21-22(F) hid_ageRecode 23-23(F). exe. >Error # 4130 in column 1024. Text: (End of Command) >The DATA LIST command contains an invalid format. >Execution of this command stops. |
In reply to this post by Kunal
In the DATA LIST command: Get rid of the (F) DATA LIST FILE=dataASC FIXED / responseid 1-8 respid 9-16 s1 17 s2a 18-20 hid_s2b 21-22 hid_ageRecode 23-23 . Exec. John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/1-survey-analysis-workshop From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Kunal Hi I am trying to make a SPSS file from .dat file using below syntax but is giving error. Please help FILE HANDLE dataASC /RECFORM=FIXED /LRECL=30000 /NAME="C:\65111_data.dat". * The name in the previous line must include the full path to the data file, please amend as necessary. DATA LIST FILE=dataASC FIXED / responseid 1-8(F) respid 9-16(F) s1 17-17(F) s2a 18-20(F) hid_s2b 21-22(F) hid_ageRecode 23-23(F). exe. >Error # 4130 in column 1024. Text: (End of Command) >The DATA LIST command contains an invalid format. >Execution of this command stops. View this message in context: Data creation |
The F in the DATA LIST is legal. I don't think that is the problem here given the column number that is flagged. On Sat, Apr 30, 2016 at 11:19 PM, John F Hall <[hidden email]> wrote:
|
Administrator
|
In reply to this post by John F Hall
John, ??? Why would that have ANY impact? It is perfectly legitimate and makes the intention explicit.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me. --- "Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis." Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?" |
Free forum by Nabble | Edit this page |