Export data with SPSS on Mac

More
4 years 5 months ago #95416 by ecaspar
ecaspar created the topic: Export data with SPSS on Mac
Dear all,
I hope that this subject doesn't already exist!

I'm trying to export data I obtained on SPSS. When I "run all" the syntaxt, I have a lot of error messages. You can find bellow a resume. I checked that the syntaxt is correctly saved in UNICODE. After reading some posts on the forum, it appeared that the error could come from the famous fourth or fifth line. I tried numerous possiblities. I copyied directement the link given by the computer, but without succes (/Users/emilie/Desktop/'survey_78161_SPSS_data_file.dat'). I tried with and without "/" before Users. I checked that the survey number was correct.
I asked for help to one of my colleague and he answered that sometimes, the error comed from mac. But he didn't know how. So I tried on a Windows computer, but there's nothing to do.

>Error. Command name: GET DATA
>(2267) Missing expected token: =
>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.
*Define Variable Properties.
VARIABLE LABELS V1 "id".

>Error # 100. Command name: VARIABLE LABELS
>This command is not permitted before the beginning of file definition
>commands.
>Execution of this command stops.
VARIABLE LABELS V2 "submitdate".

>Error # 100. Command name: VALUE LABELS
>This command is not permitted before the beginning of file definition
>commands.
>Execution of this command stops.
1 "Féminin"
2 "Masculin".
VALUE LABELS V8

Does anybody have a solution?

Thank in advance,

Emilie

Please Log in to join the conversation.

More
4 years 5 months ago #95421 by mdekker
mdekker replied the topic: Export data with SPSS on Mac
Please post the exact line 5 you used it should read:

/FILE='/Users/emilie/Desktop/'survey_78161_SPSS_data_file.dat'

---
Menno Dekker

Please Log in to join the conversation.

More
4 years 5 months ago #95428 by ecaspar
ecaspar replied the topic: Export data with SPSS on Mac
There it is :

SET UNICODE=ON.
GET DATA
/TYPE=TXT
/FILE=Users/emilie/Desktop/'survey_78161_SPSS_data_file.dat'

Please Log in to join the conversation.

More
4 years 5 months ago #95429 by mdekker
mdekker replied the topic: Export data with SPSS on Mac
/FILE='/Users/emilie/Desktop/survey_78161_SPSS_data_file.dat'

The last line should be like this (I made an error in my previous message too).

/FILE='xxxxxxxxxxxxxxxxxxxxxxxx'
the xxxxxx should be the full path to the file without single quotes in it.

---
Menno Dekker

Please Log in to join the conversation.

More
4 years 5 months ago #95431 by ecaspar
ecaspar replied the topic: Export data with SPSS on Mac
Wonderful!
That functions! Indeed, I didn't try this possibility.
Thank you very much!
Emilie

Please Log in to join the conversation.

More
1 year 4 months ago #137682 by brunoguasti
brunoguasti replied the topic: Export data with SPSS on Mac
I'm having the same problem! but I can't solve it. I'm using SPSS 21 and it gives the same error message. Could you help me?

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now