- Posts: 3
- Thank you received: 0
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
SPSS export Variable renaming problem
- tomW
- Topic Author
- Offline
- New Member
Less
More
10 years 6 months ago - 10 years 6 months ago #99821
by tomW
SPSS export Variable renaming problem was created by tomW
I am exporting my survey from limesurvey 2.00 to SPSS 20.0. The variables rename the standard SPSS V1,V2 etc and are not renamed but the data is imported. After checking the .sps file it appears that the command RENAME VARIABLE is used rather than RENAME VARIABLES (plural) - it remained greyed out in the singular. I have run the program both with and without the renamed variables. The spss file is as below.
Can anyone help please. Thanks
*$Rev: 121017 $ all 2.
SET UNICODE=ON.
SHOW LOCALE.
PRESERVE LOCALE.
SET LOCALE='en_UK'.
GET DATA
/TYPE=TXT
/FILE='survey_138727_SPSS_data_file.dat'
/DELCASE=LINE
/DELIMITERS=","
/QUALIFIER="'"
/ARRANGEMENT=DELIMITED
/FIRSTCASE=1
/IMPORTCASE=ALL
/VARIABLES=
V1 F7
V2 A16
V3 DATETIME23.2
V5 A19
V6 F1
V7 F1
V8 F2.
CACHE.
EXECUTE.
*Define Variable Properties.
VARIABLE LABELS V1 "id".
VARIABLE LABELS V2 "token".
VARIABLE LABELS V3 "submitdate".
VARIABLE LABELS V5 "startlanguage".
VARIABLE LABELS V6 "Does SPSS work with limesurvey".
VARIABLE LABELS V7 "".
VARIABLE LABELS V8 "".
*Define Value labels.
VALUE LABELS V6
1 "Yes"
2 "No".
VALUE LABELS V8
01 "Strongly disagree"
02 "Disagree"
03 "Slightly disagree"
04 "Undecided"
05 "Slightly agree"
06 "Agree"
07 "Strongly agree".
VARIABLE LEVEL V7(SCALE).
RENAME VARIABLES ( V1 = id ).
RENAME VARIABLES ( V2 = token ).
RENAME VARIABLES ( V3 = submitdate ).
RENAME VARIABLES ( V5 = startlanguage ).
RENAME VARIABLES ( V6 = G1YesNo ).
RENAME VARIABLES ( V7 = G1Likert ).
RENAME VARIABLES ( V8 = G1_Likert2 ).
RESTORE LOCALE.
The output log is:
GET DATA
/TYPE=TXT
/FILE='/Users/Tom/Public/limesurveytest/survey_138727_SPSS_data_file.dat'
/DELCASE=LINE
/DELIMITERS=","
/QUALIFIER="'"
/ARRANGEMENT=DELIMITED
/FIRSTCASE=1
/IMPORTCASE=ALL
/VARIABLES=
V1 F7
V2 A16
V3 DATETIME23.2
V5 A19
V6 F1
V7 F1
V8 F2.
Can anyone help please. Thanks
*$Rev: 121017 $ all 2.
SET UNICODE=ON.
SHOW LOCALE.
PRESERVE LOCALE.
SET LOCALE='en_UK'.
GET DATA
/TYPE=TXT
/FILE='survey_138727_SPSS_data_file.dat'
/DELCASE=LINE
/DELIMITERS=","
/QUALIFIER="'"
/ARRANGEMENT=DELIMITED
/FIRSTCASE=1
/IMPORTCASE=ALL
/VARIABLES=
V1 F7
V2 A16
V3 DATETIME23.2
V5 A19
V6 F1
V7 F1
V8 F2.
CACHE.
EXECUTE.
*Define Variable Properties.
VARIABLE LABELS V1 "id".
VARIABLE LABELS V2 "token".
VARIABLE LABELS V3 "submitdate".
VARIABLE LABELS V5 "startlanguage".
VARIABLE LABELS V6 "Does SPSS work with limesurvey".
VARIABLE LABELS V7 "".
VARIABLE LABELS V8 "".
*Define Value labels.
VALUE LABELS V6
1 "Yes"
2 "No".
VALUE LABELS V8
01 "Strongly disagree"
02 "Disagree"
03 "Slightly disagree"
04 "Undecided"
05 "Slightly agree"
06 "Agree"
07 "Strongly agree".
VARIABLE LEVEL V7(SCALE).
RENAME VARIABLES ( V1 = id ).
RENAME VARIABLES ( V2 = token ).
RENAME VARIABLES ( V3 = submitdate ).
RENAME VARIABLES ( V5 = startlanguage ).
RENAME VARIABLES ( V6 = G1YesNo ).
RENAME VARIABLES ( V7 = G1Likert ).
RENAME VARIABLES ( V8 = G1_Likert2 ).
RESTORE LOCALE.
The output log is:
GET DATA
/TYPE=TXT
/FILE='/Users/Tom/Public/limesurveytest/survey_138727_SPSS_data_file.dat'
/DELCASE=LINE
/DELIMITERS=","
/QUALIFIER="'"
/ARRANGEMENT=DELIMITED
/FIRSTCASE=1
/IMPORTCASE=ALL
/VARIABLES=
V1 F7
V2 A16
V3 DATETIME23.2
V5 A19
V6 F1
V7 F1
V8 F2.
Last edit: 10 years 6 months ago by tomW.
The topic has been locked.
- atavei
- Offline
- New Member
Less
More
- Posts: 10
- Thank you received: 0
10 years 6 months ago #99846
by atavei
Replied by atavei on topic SPSS export Variable renaming problem
Hello. I've seen this happen when the .sps file is openned and saved in an editor other than a true text editor or in the spss syntax editor. Rename Variable (in singular) works ok.
I would do the following:
a. Tell SPSS to show the full commands log in the output window (go to preferences for this). That will tell you what exactly was processed, where spss stopped and any errors associated with the run. From what you say, nothing after the execute. command seems to be working. The execute. command is processing the data job but something is wrong after that command.
b. Erase the *comment after the execute. command and save using a true text editor.
c. Download the .sps file again and open it directly in the spss syntax editor. Do your editing there and run. (This one is probably your best and expedite choice.)
Hope this help.
Samuel Figueroa
UPR Cayey
I would do the following:
a. Tell SPSS to show the full commands log in the output window (go to preferences for this). That will tell you what exactly was processed, where spss stopped and any errors associated with the run. From what you say, nothing after the execute. command seems to be working. The execute. command is processing the data job but something is wrong after that command.
b. Erase the *comment after the execute. command and save using a true text editor.
c. Download the .sps file again and open it directly in the spss syntax editor. Do your editing there and run. (This one is probably your best and expedite choice.)
Hope this help.
Samuel Figueroa
UPR Cayey
The topic has been locked.
- mdekker
- Offline
- LimeSurvey Community Team
Less
More
- Posts: 55
- Thank you received: 12
10 years 6 months ago #99849
by mdekker
---
Menno Dekker
Replied by mdekker on topic SPSS export Variable renaming problem
Probably you did not do RUN ALL from the menu.
---
Menno Dekker
The topic has been locked.
- tomW
- Topic Author
- Offline
- New Member
Less
More
- Posts: 3
- Thank you received: 0
10 years 5 months ago #100147
by tomW
Replied by tomW on topic SPSS export Variable renaming problem
Thank you so much. Yes Run All works. Guess this tells you how new I am to SPSS. Now on to sorting out Fleiss Kappa in SPSS.
The topic has been locked.