File recovery

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

File recovery

John F Hall

Just done something stupid.  I had a *.sav file on which I used casestovars.  I’ve accidentally deleted the original  file: how can I get it back?  I’ve tried varstocases (which I’ve never used before) and the data are still there (6 variables) but in triplets of rows.  Meanwhile SPSS has seized up doing something else (massive *.sav file 95000 cases 10755 variables) and is displaying a very distorted screen of wide.sav with Java icon top left plus Outlook Inbox.  Time for a break I think.

 

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

 

 

 

===================== 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: File recovery

Maguin, Eugene

Big oops!

I‘m confused by your message. It reads as if two completely different things are being named as problems.

 

1) Just done something stupid.  I had a *.sav file on which I used casestovars.  I’ve accidentally deleted the original  file: how can I get it back?  I’ve tried varstocases (which I’ve never used before) and the data are still there (6 variables) but in triplets of rows. 

 

2) Meanwhile SPSS has seized up doing something else (massive *.sav file 95000 cases 10755 variables) and is displaying a very distorted screen of wide.sav with Java icon top left plus Outlook Inbox.  Time for a break I think.

 

I might know something about 1) but I don’t know anything about 2).

So: 1) a. What was the data structure before the casestovars? B. What was data structure after the varstocases? The key thing to differentiate between is ID type variables and substantive variables. It sounds like you worked from the menus but if you have the two command syntaxes, include them also.

 

Just out of curiosity, are 1) and 2) (possibly) related somehow?

 

Gene Maguin

 

 

 

 

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of John F Hall
Sent: Friday, May 06, 2016 1:33 PM
To: [hidden email]
Subject: File recovery

 

Just done something stupid.  I had a *.sav file on which I used casestovars.  I’ve accidentally deleted the original  file: how can I get it back?  I’ve tried varstocases (which I’ve never used before) and the data are still there (6 variables) but in triplets of rows.  Meanwhile SPSS has seized up doing something else (massive *.sav file 95000 cases 10755 variables) and is displaying a very distorted screen of wide.sav with Java icon top left plus Outlook Inbox.  Time for a break I think.

 

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

 

 

 

===================== 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: File recovery

John F Hall

Gene

 

Ignore 2)  That was another process entirely.

 

In 1) I had six variables: 

date-time date time sys dia pulse.  Date-time was derived:

 

* Encoding: UTF-8.

compute date_time = date + time.

exec.

 

Andy wheeler sent me some syntax for producing graphs over time which involved casestovars.  The resulting Data Editor is a single line.

~   ~ Date.511                   date.512    time.1 ~ ~ ~                                 date_time.1              date_time2

~ ~ 03-May-201603-        May-2016  12:15  12:15 ~ ~   4:39 4:39 13-Jan-2016 12:15  13-Jan-2016 12:15

 

When I tried to recreate the file I lost it looks like this:

 

time       bp_type date2                   date_time                          sys2

 

16:47     Sys         13-Jan-2016        13-Jan-2016 16:47           127

16:47     dia          13-Jan-2016        13-Jan-2016 16:47           81

16:47     pulse      13-Jan-2016        13-Jan-2016 16:47           67

17:40     Sys         13-Jan-2016        13-Jan-2016 17:40           119

17:40     dia          13-Jan-2016        13-Jan-2016 17:40           74

17:40     pulse      13-Jan-2016        13-Jan-2016 17:40           66

19:21     Sys         13-Jan-2016        13-Jan-2016 19:21           116

19:21     dia          13-Jan-2016        13-Jan-2016 19:21           74

19:21     pulse      13-Jan-2016        13-Jan-2016 19:21           68

20:01     Sys         13-Jan-2016        13-Jan-2016 20:01           119

20:01     dia          13-Jan-2016        13-Jan-2016 20:01           73

20:01     pulse      13-Jan-2016        13-Jan-2016 20:01           71

 

. . and so on for 350 rows.  (Should there be 512?)  The varstocases syntax file to produce this disappeared when SPSS stopped working, but all I want to do is to spread the triplets out to get:

 

date                      time       sys          dia`        pulse      date-time

 

13-Jan-2016        16:47     127        81           67           13-Jan-2016 16:47

 

Does that explain?

 

 

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

 

 

John

 

From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Maguin, Eugene
Sent: 06 May 2016 20:05
To: [hidden email]
Subject: Re: File recovery

 

Big oops!

I‘m confused by your message. It reads as if two completely different things are being named as problems.

 

1) Just done something stupid.  I had a *.sav file on which I used casestovars.  I’ve accidentally deleted the original  file: how can I get it back?  I’ve tried varstocases (which I’ve never used before) and the data are still there (6 variables) but in triplets of rows. 

 

2) Meanwhile SPSS has seized up doing something else (massive *.sav file 95000 cases 10755 variables) and is displaying a very distorted screen of wide.sav with Java icon top left plus Outlook Inbox.  Time for a break I think.

 

I might know something about 1) but I don’t know anything about 2).

So: 1) a. What was the data structure before the casestovars? B. What was data structure after the varstocases? The key thing to differentiate between is ID type variables and substantive variables. It sounds like you worked from the menus but if you have the two command syntaxes, include them also.

 

Just out of curiosity, are 1) and 2) (possibly) related somehow?

 

Gene Maguin

 

 

 

 

 

From: SPSSX(r) Discussion [[hidden email]] On Behalf Of John F Hall
Sent: Friday, May 06, 2016 1:33 PM
To:
[hidden email]
Subject: File recovery

 

Just done something stupid.  I had a *.sav file on which I used casestovars.  I’ve accidentally deleted the original  file: how can I get it back?  I’ve tried varstocases (which I’ve never used before) and the data are still there (6 variables) but in triplets of rows.  Meanwhile SPSS has seized up doing something else (massive *.sav file 95000 cases 10755 variables) and is displaying a very distorted screen of wide.sav with Java icon top left plus Outlook Inbox.  Time for a break I think.

 

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

 

 

 

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

===================== 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: File recovery

PRogman
You may have a record of your actions in the Journal file. Look under Edit>Options>File locations. You will find a box named 'Session journal' and a text field stating where the journal file is located. If 'Record Syntax in Journal' is checked and 'Append' is selected, there may be a record of your syntax. The file may be large...
perhaps a good editor (e.g. Notepad++) is better to handle so large a file.
The first line of every sesion is a time stamp in local system format.
Search for the date you want, it will probably be close to the end of the file (depending on how active you have been running syntax).
The VARSTOCASES command must specify ALL variables you want restructured. Don't forget /INDEX if you want a CaseID (which you don't have?)

HTH, PRogman

DATA LIST free /
d.1    d.2    d.3   (3DATE11)        
t.1    t.2    t.3   (3TIME5)  
Sys.1  Sys.2  Sys.3 (3F6.0)
Dia.1  Dia.2  Dia.3 (3F6.0) .
BEGIN DATA
13-Jan-2016  13-Jan-2016  13-Jan-2016  
16:47  17:40  19:21  
127   119   116
 81    74    74
END DATA.
DATASET NAME JFH .

VARSTOCASES
  /MAKE d   FROM d.1   TO d.3
  /MAKE t   FROM t.1   TO t.3
  /MAKE Sys FROM Sys.1 TO Sys.3
  /MAKE Dia FROM Dia.1 TO Dia.3
  /INDEX=Case
  /KEEP=
  /NULL=KEEP.

Reply | Threaded
Open this post in threaded view
|

Re: File recovery

John F Hall
That is really helpful.  Will run the code when I have a minute.
Desperately completing IBM author enrolment form for licence renewal.  There
was some confusion over files.  The blood pressure one which I lost was
quite small: the huge one for British Social Attitudes is untouched.

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

=====================
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: File recovery

John F Hall
In reply to this post by PRogman
Checked the jnl file (first time ever looked).  Nothing since.  Record
syntax and Append both checked.  Max was set at 10. Earliest entry was 18
May 2015, last 8 Feb 2016.  I use SPSS dozens of times a week for years on
end, so am wondering why there was so little in the jnl.  I'll have a shot
with your varstocases syntax.  No need for ID: it's the #seqnum.

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

=====================
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: File recovery

Jon Peck
Take another look.  The journal file has always reliably recorded all the syntax for me.  If the location happens not to be writable, set it somewhere else.  Note that the journal file location is generally specific to a specific Statistics version.

On Sat, May 7, 2016 at 11:00 PM, John F Hall <[hidden email]> wrote:
Checked the jnl file (first time ever looked).  Nothing since.  Record
syntax and Append both checked.  Max was set at 10. Earliest entry was 18
May 2015, last 8 Feb 2016.  I use SPSS dozens of times a week for years on
end, so am wondering why there was so little in the jnl.  I'll have a shot
with your varstocases syntax.  No need for ID: it's the #seqnum.

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

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