Date: Wed, 13 Oct 2004 09:27:40 -0500
Reply-To: "Peck, Jon" <firstname.lastname@example.org>
Sender: "SPSSX(r) Discussion" <SPSSX-L@LISTSERV.UGA.EDU>
From: "Peck, Jon" <email@example.com>
Subject: Re: Designated windows with 2 instances of SPSS
Content-Type: text/plain; charset="us-ascii"
Here is an autoscript that might be useful in keeping track of multiple sessions.
Put this in your autoscript file (normally autoscript.sbs in the scripts directory) and make sure that it is enabled via Edit/Options/Scripts. You might need to restart SPSS afterwards to get this to work.
What it does is each time a syntax window is opened, whether new or an existing syntax file, it inserts a comment at the top of the window containing the date/time and the name of the current data file (blank if a new unsaved file). Since it is inserted as a comment, you can include it in commands you run without SPSS complaining.
Sub document_create(obj As Object)
On Error Resume Next
If (obj.Type = 2) Then
obj.Text = "*syntax window created:" & Now() & _
" Data File:" & objSpssApp.Documents.GetDataDoc(0).GetDocumentPath _
& "." & vbCrLf & obj.Text
From: SPSSX(r) Discussion [mailto:SPSSX-L@LISTSERV.UGA.EDU] On Behalf Of John Dashper
Sent: Tuesday, October 12, 2004 12:04 PM
Subject: Re: [SPSSX-L] Designated windows with 2 instances of SPSS
Click on the 'window' menu at the top of the syntax file and see which
data file is associated with that syntax.
(Or, click on the 'window' menu at the top of the data file and see
which syntax etc)
From: David Hutton [mailto:David.Hutton@cem.dur.ac.uk]
Sent: 12 October 2004 15:12
Subject: Designated windows with 2 instances of SPSS
How can I tell which of two data files a syntax window will work on?
I am examining the data file (1) created from a long process, and to do
so I have changed the column widths so I can see the important variables
at a glance - I could have changed their order if I wished. But I do
not wish to save these changes. (although of course I have saved the
syntax that produced the file!)
Meanwhile I want to examine the data in a file (2) that is a precursor
of the above file (1), so I have opened a second instance of SPSS.
Without risking changing the data in either file, how can I tell which
datafile will be affected when I run syntax? I know that a designated
window has an exclamation point in red in the status bar, but that does
not tell me which of the two files it will affect if I run syntax from
it. In particular I wish to run a GET DATA, which would overwrite what's
in the working file.
All the best,
for Local Education Authorities
and International Schools
The Curriculum, Evaluation and Management Centre:
C.E.M. Centre, University of Durham
Mountjoy Research Centre 4
Stockton Road, DURHAM DH1 3UZ
Tel: +44(0)191 33 44 235
CEM Centre Website - www.cemcentre.org