Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calling a Macro from Syntax

26 views
Skip to first unread message

KDijkman

unread,
Oct 9, 2003, 6:37:08 PM10/9/03
to
Hi-

Can someone advise me on how to run a SBS file from syntax? I've
tried the INCLUDE FILE command and failed miserably.

Thanks for any help you can give.

Raynald Levesque

unread,
Oct 9, 2003, 7:52:55 PM10/9/03
to
On 9 Oct 2003 15:37:08 -0700, kdyk...@knowledgenetworks.com
(KDijkman) wrote:

Hi

SCRIPT 'path\script name.sbs'.

If you need to pass an argument to the script, use
SCRIPT 'path\script name.sbs' ('argument').

The argument must be between quotes and the whole thing must be
between ()

HTH

Raynald Levesque rlev...@videotron.ca
Visit My SPSS Pages: http://pages.infinit.net/rlevesqu/index.htm

Matthias Nuebling

unread,
Oct 10, 2003, 5:35:54 AM10/10/03
to
Hi

It is like Raynald said - theoretically and mostly working.
But: I've made the experience that sometimes it does not work (with SPSS
11). The message is "script running" but in fact nothing is running and
you have to shut down SPSS via task manager.

In these caes i do it by menu and it works. But that is no solution, of
course...

regards
matthias


KDijkman schrieb:

Neila Nessa

unread,
Oct 10, 2003, 8:44:58 PM10/10/03
to
Hello Matthias,
I bet you have something to the effect of
objSPSS.ExecuteCommands(stringCommands,True)
That is instructing SPSS to execute the syntax commands SYNCHRONOUSLY
(which it cannot do from a script executed from Syntax). You will
need to use
objSPSS.ExecuteCommands(stringCommands,False), or run the whole thing
from VB or VBA...
HTH, Neila


Matthias Nuebling <ffas.f...@t-online.de> wrote in message news:<3F867D7A...@t-online.de>...

Raynald Levesque

unread,
Oct 10, 2003, 9:31:48 PM10/10/03
to

Hi Matthias

The problem you describe:


>"script running" but in fact nothing is running and
>you have to shut down SPSS via task manager.

occurs when a Script is *not* designed to be called from a syntax.

One thing that renders a script not designed to be called from a
syntax file is when the script has the command:
While objSpssApp.IsBusy
'wait for processor to be free
Wend

When the syntax file calls the script, the syntax remains in "busy
mode" until the script has terminated.

So when the script checks whether the processor is free, the answer is
always that the processor is busy! So the script is in an endless
loop.

0 new messages