V15 - Resetting Data File After Running Syntax to Run Some GUI

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

V15 - Resetting Data File After Running Syntax to Run Some GUI

Feinstein, Zachary
I am currently working with V15.  I work a lot with multiple data files
using DATASET NAME and DATASET CLOSE ALL a lot.
 
Many times I will run a set of syntax up to a point.  I think wish to do
a repeat of the last CTABLES or FREQ VARS commands and it does not find
the variables.  I am assuming that SPSS is pointing to one of the data
files that I do not wish for it to point to.
 
Is there any way to set up SPSS so that if I am running a set of syntax,
then run a command in the GUI, or re-run a set of the syntax, that it
always refers to the most recent data file in the working memory?
 
Thanks.
 
Zachary
[hidden email]
 
Reply | Threaded
Open this post in threaded view
|

Re: V15 - Resetting Data File After Running Syntax to Run Some GUI

Peck, Jon
If you activate a dataset by clicking on the Data Editor, that becomes the active dataset when you run syntax.  You can always use
DATASET ACTIVATE fred.
in front of your syntax block to make sure that dataset fred is used for the following syntax regardless of what dataset is active in the frontend.  (fred, I'm assuming, has been declared as a dataset with
DATASET DECLARE fred. or DATASET NAME fred.)

HTH,
Jon Peck

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Feinstein, Zachary
Sent: Tuesday, April 03, 2007 11:10 AM
To: [hidden email]
Subject: [SPSSX-L] V15 - Resetting Data File After Running Syntax to Run Some GUI

I am currently working with V15.  I work a lot with multiple data files
using DATASET NAME and DATASET CLOSE ALL a lot.

Many times I will run a set of syntax up to a point.  I think wish to do
a repeat of the last CTABLES or FREQ VARS commands and it does not find
the variables.  I am assuming that SPSS is pointing to one of the data
files that I do not wish for it to point to.

Is there any way to set up SPSS so that if I am running a set of syntax,
then run a command in the GUI, or re-run a set of the syntax, that it
always refers to the most recent data file in the working memory?

Thanks.

Zachary
[hidden email]