Data creation

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Data creation

Kunal
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.
Reply | Threaded
Open this post in threaded view
|

Re: Data creation

Jon Peck
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.

View this message in context: Data creation
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
===================== 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



--
Jon K Peck
[hidden email]

===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: Data creation

John F Hall
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
Sent: 30 April 2016 21:38
To: [hidden email]
Subject: Data creation

 

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
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
===================== 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

===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: Data creation

Jon Peck
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:

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
Sent: 30 April 2016 21:38
To: [hidden email]
Subject: Data creation

 

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
Sent from the SPSSX Discussion mailing list archive at Nabble.com.
===================== 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

===================== 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



--
Jon K Peck
[hidden email]

===================== 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
Reply | Threaded
Open this post in threaded view
|

Re: Data creation

David Marso
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.



John F Hall wrote
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] <mailto:[hidden email]>  
Website: www.surveyresearch.weebly.com
<http://www.surveyresearch.weebly.com/> 
SPSS start page:  www.surveyresearch.weebly.com/1-survey-analysis-workshop
<http://surveyresearch.weebly.com/1-survey-analysis-workshop.html> 
 
 
 
 
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Kunal
Sent: 30 April 2016 21:38
To: [hidden email]
Subject: Data creation
 
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
<http://spssx-discussion.1045642.n5.nabble.com/Data-creation-tp5732065.html>

Sent from the SPSSX Discussion mailing list archive
<http://spssx-discussion.1045642.n5.nabble.com/>  at Nabble.com.
===================== To manage your subscription to SPSSX-L, send a message
to [hidden email] <mailto:[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

=====================
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
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?"