Problem with GET /KEEP

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

Problem with GET /KEEP

John F Hall
Just spent ages trying to get GET /KEEP to work the way it used to and the way I explain it in tutorials.
 
I'm working with a *.sav file on my own machine which has over 1000 variables, but I only need five for the tutorial.
 
GET
  FILE='C:\Documents and Settings\Owner\Desktop\Weebly website contents\SPSS-PASW files\weebly_bsa89.sav'
  /keep v275 v1408 v1411 v1412  v2374 .
 
 
fetches the file, but it still has over 1000 variables.  I tried all variations of
 
EXECUTE. and
DATASET NAME DataSetn WINDOW=FRONT, but got nowhere.
 
After a lot of messing about I managed to get what I wanted with
 
save out 'C:\Documents and Settings\Owner\Desktop\Weebly website contents\SPSS-PASW files\weeblytest.sav'
  /keep v275 v1408 v1411 v1412  v2374 . 
 
but even that didn't work by itself.  In the end
 
XSAVE. worked, but I had to go back to the folder and double click on the new file before I could use it.
 
Any users trying to get my tutorial and exercise to work would have gone home.  Is there any way I can get GET to work first time and for the reduced file to be the one displayed in the Data Editor?  Otherwise , I have a lot of rewriting to do.
 
Reply | Threaded
Open this post in threaded view
|

Re: Problem with GET /KEEP

John F Hall
Panic over.  Working carefully from scratch, this time I got a new untitled Data Editor with:
 
title 'Recode exercise 2.3.1.3' .
GET
  FILE='C:\Documents and Settings\Owner\Desktop\Weebly website contents\SPSS-PASW files\newbsa89.sav'
  /keep v275 v1408 v1411 v1412 v1727 v2363 v2374 .
 
Last time I didn't get a new Data Editor, but I don't know why: the syntax is the same, apart from adding two more variables to keep.  The target file has a different name, but it is a copy of the one in the example above, so it should have worked.
 
At least i don't now have to rewrite the tutorials (apart from sticking the screenshots in).
 
----- Original Message -----
Sent: Saturday, August 07, 2010 1:29 PM
Subject: Problem with GET /KEEP

Just spent ages trying to get GET /KEEP to work the way it used to and the way I explain it in tutorials.
 
I'm working with a *.sav file on my own machine which has over 1000 variables, but I only need five for the tutorial.
 
GET
  FILE='C:\Documents and Settings\Owner\Desktop\Weebly website contents\SPSS-PASW files\weebly_bsa89.sav'
  /keep v275 v1408 v1411 v1412  v2374 .
 
 
fetches the file, but it still has over 1000 variables.  I tried all variations of
 
EXECUTE. and
DATASET NAME DataSetn WINDOW=FRONT, but got nowhere.
 
After a lot of messing about I managed to get what I wanted with
 
save out 'C:\Documents and Settings\Owner\Desktop\Weebly website contents\SPSS-PASW files\weeblytest.sav'
  /keep v275 v1408 v1411 v1412  v2374 . 
 
but even that didn't work by itself.  In the end
 
XSAVE. worked, but I had to go back to the folder and double click on the new file before I could use it.
 
Any users trying to get my tutorial and exercise to work would have gone home.  Is there any way I can get GET to work first time and for the reduced file to be the one displayed in the Data Editor?  Otherwise , I have a lot of rewriting to do.
 
Reply | Threaded
Open this post in threaded view
|

Re: Problem with GET /KEEP

John F Hall
It's just done it again!  I think it may be to do with which *.sav files I have open, in this case just one, but it's the one generated by the opening GET command in a previous run. Closing it will close SPSS, but I'll do that if I have to and start over. This time I don't get a new Untitled Data Editor however hard I try.  Any idea as to what is going on?
----- Original Message -----
Sent: Saturday, August 07, 2010 3:47 PM
Subject: Re: Problem with GET /KEEP

Panic over.  Working carefully from scratch, this time I got a new untitled Data Editor with:
 
title 'Recode exercise 2.3.1.3' .
GET
  FILE='C:\Documents and Settings\Owner\Desktop\Weebly website contents\SPSS-PASW files\newbsa89.sav'
  /keep v275 v1408 v1411 v1412 v1727 v2363 v2374 .
 
Last time I didn't get a new Data Editor, but I don't know why: the syntax is the same, apart from adding two more variables to keep.  The target file has a different name, but it is a copy of the one in the example above, so it should have worked.
 
At least i don't now have to rewrite the tutorials (apart from sticking the screenshots in).
 
----- Original Message -----
Sent: Saturday, August 07, 2010 1:29 PM
Subject: Problem with GET /KEEP

Just spent ages trying to get GET /KEEP to work the way it used to and the way I explain it in tutorials.
 
I'm working with a *.sav file on my own machine which has over 1000 variables, but I only need five for the tutorial.
 
GET
  FILE='C:\Documents and Settings\Owner\Desktop\Weebly website contents\SPSS-PASW files\weebly_bsa89.sav'
  /keep v275 v1408 v1411 v1412  v2374 .
 
 
fetches the file, but it still has over 1000 variables.  I tried all variations of
 
EXECUTE. and
DATASET NAME DataSetn WINDOW=FRONT, but got nowhere.
 
After a lot of messing about I managed to get what I wanted with
 
save out 'C:\Documents and Settings\Owner\Desktop\Weebly website contents\SPSS-PASW files\weeblytest.sav'
  /keep v275 v1408 v1411 v1412  v2374 . 
 
but even that didn't work by itself.  In the end
 
XSAVE. worked, but I had to go back to the folder and double click on the new file before I could use it.
 
Any users trying to get my tutorial and exercise to work would have gone home.  Is there any way I can get GET to work first time and for the reduced file to be the one displayed in the Data Editor?  Otherwise , I have a lot of rewriting to do.