By now, you should know how important it is to save your syntax in SPSS. Well, despite your best efforts, sometimes accidents happen. The last couple of summers, I did data management for a longitudinal study of college students’ sexual behaviors. Once, after I hit a flow state and didn’t look up from my computer for hours, my stomach’s aggressive growling jerked me back to reality. Adhering to my policy never to work when hungry, I decided to close my SPSS file and have some lunch. But when SPSS prompted me to save my syntax, my hypoglycemic brain directed my fingers to click “don’t save.” I noticed what I was doing a split second before I clicked the wrong button, but it was already too late! My last four hours of work were gone. Or were they? (They weren’t.) Here is what I did to recover my syntax: Step 1. Don’t Panic. Step 2. Eat lunch. Nothing helps me keep my cool like having some PB&J in my belly. Step 3. Calmly Google how to recover SPSS syntax. My Google wizardry taught me that, fortunately, the syntax window is not the only place SPSS stores your syntax. The SPSS journal logs your activity on SPSS and stores it in one file. That means every time you open or close a window or perform a command, it goes in the journal. You can change the journal settings to record only your recent activity, but the default is to record everything you ever do in one giant file. To access the journal file, go to Edit --> Options…, and select the File Locations tab. This window will show you the location of the journal file. To open the journal file, you have two options. First, you can open it in SPSS by opening the journal file as if it were a syntax file. Second, you can open the journal file as a text file. After closing SPSS, navigate to the location listed for the journal file, and open it with a text editor like Notepad. This video gives a good demonstration of how to use a journal file, beginning around 3:00. It’s that easy to find lost syntax. However, just because the journal file exists doesn’t mean you shouldn’t be meticulous about saving your work in syntax files. What if you find that your journal was mysteriously set to “overwrite” instead of “append”? Syntax files also offer features that the journal doesn’t, like the ability to store commands in multiple files. But if you forget to eat lunch and make a mistake because you are working while hungry, the journal is a very handy backup. Just remember to take food breaks next time.
44 Comments
Bets
6/16/2015 03:45:15 am
this just helped me so much - thank you!
Reply
Fathima Ilham
1/14/2022 04:15:24 am
Hi! Is there any way to recover an output file that I mistakenly restored with a new output file?
Reply
Alicia
7/26/2015 01:20:05 pm
This... saved me. 11 PM, 6 hours of work on a project worth 20% of my grade, and most of the complicated work done after the last save. And SPSS freezes during the save, and the syntax doesn't save, but the data set does. And this post honestly kept me from killing someone with my bare hands, because it meant I could go in, copy and past from the last point saved in the master file, and take out the tests I knew were my goofs.
Reply
Bella
10/12/2015 05:19:31 am
You are the best, thank you very much for sharing this knowledge with the world!!!
Reply
Héctor
12/11/2015 08:09:28 am
Thanks a lot for your help!
Reply
Corentin le Masne de Chermont
2/27/2016 08:06:23 am
Saved my life man!
Reply
Mallory
4/9/2016 11:57:36 am
I was able to locate the journal file, but I am unable to open it as a syntax file through SPSS. I can open it in word, but it just lists all the test that I ran (the data is not actually there). When I try to open it in SPSS, the file is empty? Help!
Reply
Nicholas
7/11/2016 03:12:30 am
Hi Mallory. I'd like to know if you have gotten a solution to the above mentioned problem. I'm in the same situation at the moment and I need help asap.
Reply
FM
1/20/2017 10:12:36 am
THANK YOU!!!
Reply
Armend
3/19/2017 11:32:04 am
Hi guys/gals, I'm having a big trouble of recovering the job I've done in my project, unfortunately at least 50% of the job I've done for 2 days has gone.. yeah I know it's kinda stupid I didn't save it, but it happened cause I thought it has some kind of autosave!! Anyway my trouble is that when I'm trying to paste stuff from JNL file I'm getting a lot of errors!! if anyone could help me, that would be a lifesaving.Thanks
Reply
Renée
4/19/2018 08:52:52 am
@Armend If you have trouble opening the .jnl file in SPSS as a syntax file, copy it and paste it to another location. In this copy, remove the .jnl from the file name and change it into .sps, then you should be able to open it in SPSS, as SPSS recognizes it as a syntax file.
Reply
megan
11/16/2017 08:58:26 pm
What a lifesaver! I was mid-breakdown after losing a day's worth of agonizing work thanks to a careless close of the syntax file. Luckily my partner had the good sense to use the magic of Google, which led us to your blog. I'm saved by the journal file!
Reply
Fatima
1/7/2018 06:59:57 pm
When i saw the cartoon virus-look alike thing i was like "this is NOT funny & thats an irritating picture and too many words before i reach the line that tells me how to retrieved my info because my paper is due in the next few hours and SPSS abruptly closed!!!" Then i read your instructions and now an thinking "THIS IS THE BEST UPLOAD EVER! And that cartoon thing is funny! Haha" :) Thanks!! You are a life saver.
Reply
2/1/2018 08:54:41 am
Rose, I love you. Your post has saved me maybe an hour or two of syntax work, but days of logic that I mentally let go the second I created my syntax...and then lost when I closed my window.
Reply
Alice
2/14/2018 09:31:33 pm
THANK YOU!!!!!!!
Reply
Mike Mithell
3/26/2018 09:39:22 am
I work in Digital Preservation and have been asked to recover data from an SPSS file created in the late 70's. The file has been extracted from a 9 track tape and after removing the header, SPSS does not seem to recognize this as a .sav file and begins a text import. any ideas ?
Reply
Renée
4/19/2018 08:52:29 am
YES got it back! Thanks a lot ^_^
Reply
Chiku
4/25/2018 07:14:09 pm
Helpful.
Reply
Bill
6/27/2018 08:44:28 am
Lifesaver
Reply
Sarah
7/28/2018 02:29:00 pm
You are a lifesaver! Thank you!!!
Reply
Lucy
8/21/2018 01:39:31 am
Thank you so much! Complete lifesaver!!
Reply
chikumbusko
8/22/2018 08:11:11 am
Yes the file is found and is opened in notepad. How can I open it in spss again to find my data?
Reply
Lisa
9/24/2018 09:33:23 pm
Oh my god, this blog saved my project) I've counted a lot of dichotomous "if-then" variables, and thought they were all gone! XXX
Reply
VIVIAN
11/14/2018 06:36:50 am
thank you alice, you have saved me 2 days work
Reply
Neha verma
11/22/2018 12:12:12 am
i am still not able to get my file opened
Reply
Margit
12/20/2018 05:51:17 am
Rose, Thank You! I can't tell you how much work this saved me!!!!
Reply
Martini
3/6/2019 08:15:59 pm
A lot of the data i had entered aren't present in the file. Seems i didnt save it afterwards.
Reply
jacek
5/5/2019 01:05:36 pm
Thank you!!!
Reply
Deb
5/7/2019 07:48:06 am
Hi,
Reply
Daisy Kleijn
5/24/2019 08:17:35 am
The video doesn’t open.. anyone who can help?
Reply
omara
8/19/2019 08:31:43 am
ty
Reply
Johnson
9/3/2019 02:48:21 am
please guys i need your help, my device was attacked by ransomeware virus and i need help recovering my spss file.
Reply
Sara
10/17/2019 03:11:10 am
God bless you. You're a life saver.
Reply
Orlagh O Reilly
11/27/2019 12:49:23 pm
Hey,
Reply
Orlagh
11/28/2019 08:10:56 am
*Update****
Reply
Anon
4/24/2020 06:06:47 am
Five years later and this is still helping people! Thank you so much! Was able to recover exactly what I needed.
Reply
Auckland
8/3/2020 02:14:05 pm
Hi Rose, you have no idea what you have done. Thank you so so very much. This post was veeery helpful to me.
Reply
Faiza
9/19/2020 04:37:48 pm
Can i get back my input file of spss i lost it
Reply
Rosemary
12/2/2020 12:31:00 am
Saved my life. 3AM. I was not trying to redo all of my work again. Thank you!
Reply
Jenn
1/23/2021 03:04:57 pm
You just saved me, Rose! I am immensely grateful that you shared this tip with other SPSS users. Thanks!
Reply
Sarah Jayne
8/3/2021 08:36:03 am
Thank you, thank you, THANK YOU! I thought my Google search to attempt to find a way to recover what I had lost was futile, but I am so glad that I did. I wish I had known about this sooner. Thank you for sharing this info.
Reply
Padum
11/7/2021 12:36:11 pm
Would you please help me out to find the solution. I have open the notepad but after that I can't do anything. Please help
Reply
Padum
11/7/2021 12:33:01 pm
I can open the file in notepad but after that what should I do. Please help
Reply
Leave a Reply. |
AuthorI am a developmental researcher focusing on relationships and health in adolescence and young adulthood. Archives
January 2016
Categories |