Running Syntax

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

Running Syntax

Clarice-4
Hi,

I have problems running syntax and would be grateful if someone could help.

When I use the drop-down menu to perform some calculation and then paste
the syntax and run it immediately, it works. But if I save the syntax,
open it and then Run, I will encounter the following error:

"Error #105.
This command is not valid before a working file has been defined."

The online Help says that I need to have opened the data file before
running syntax, which I did.

I'm not sure why this is the case and whether there are some steps I
didn't do. Or maybe do I need some more syntax to specify the data file?

Any advice would be most appreciated!!!

(I'm using SPSS 16.0)

Many thanks,
Clarice

=====================
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: Running Syntax

ViAnn Beadle
I am guessing that you first open an SPSS data file from File>Open, create
it from text wizard, or use a query to build it from a database.

When you run syntax you need to include commands in your syntax to open the
data file or create it or do what you are doing today to create/open the
data file before running the syntax. Take a look at the journal file which
records all commands executed--whether they come from menu actions or from
running syntax. The location of the journal file varies by version and
operating system so the best way to find it is to look in the Options tab
which specifies its location.

If you are manually creating the data file by adding variables in the data
window and then entering data into cells no commands are executed which show
up in the journal so you'll have to do this first before running the syntax.
I'd guess that is a really unlikely scenario.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of
Clarice
Sent: Wednesday, January 21, 2009 5:37 PM
To: [hidden email]
Subject: Running Syntax

Hi,

I have problems running syntax and would be grateful if someone could help.

When I use the drop-down menu to perform some calculation and then paste
the syntax and run it immediately, it works. But if I save the syntax,
open it and then Run, I will encounter the following error:

"Error #105.
This command is not valid before a working file has been defined."

The online Help says that I need to have opened the data file before
running syntax, which I did.

I'm not sure why this is the case and whether there are some steps I
didn't do. Or maybe do I need some more syntax to specify the data file?

Any advice would be most appreciated!!!

(I'm using SPSS 16.0)

Many thanks,
Clarice

=====================
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: Running Syntax

Oliver, Richard
In reply to this post by Clarice-4
Syntax runs on the currently active dataset. It is possible to have a data file open in one Data Editor window and an empty dataset in another Data Editor window. If the latter is the active dataset, then there is no "working file" on which to run the syntax.

-----Original Message-----
From: SPSSX(r) Discussion [mailto:[hidden email]] On Behalf Of Clarice
Sent: Wednesday, January 21, 2009 6:37 PM
To: [hidden email]
Subject: Running Syntax

Hi,

I have problems running syntax and would be grateful if someone could help.

When I use the drop-down menu to perform some calculation and then paste
the syntax and run it immediately, it works. But if I save the syntax,
open it and then Run, I will encounter the following error:

"Error #105.
This command is not valid before a working file has been defined."

The online Help says that I need to have opened the data file before
running syntax, which I did.

I'm not sure why this is the case and whether there are some steps I
didn't do. Or maybe do I need some more syntax to specify the data file?

Any advice would be most appreciated!!!

(I'm using SPSS 16.0)

Many thanks,
Clarice

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