User Guide
653
SPSS Scripting
Facility
Watch tab. To display a variable, function, or expression, click it and choose Add
Watch
from the Debug menu. Displayed values are updated each time execution
pauses. You
can edit the expression to the left of ->. Press Enter to update all the
values immediately. Press Ctrl-Y to delete the line.
Stack tab. Displays the lines that called the current statement. The first line is the
current sta
tement, the second line is the one that called the first, and so on. Click any
line to highlight that line in the edit window.
Loaded tab. List the currently active scripts. Click a line to view that script.
Script Files and Syntax Files
Syntax files (*.sps) are not the same as script files (*.sbs). Syntax files have
commands written in the command language that allows you to run statistical
procedure
s and data transformations. While scripts allow you to manipulate output
and automate other tasks that you normally perform using the graphical interface of
menus and dialog boxes, the command language provides an alternative method for
communic
ating directly with the program’s back end, the part of the system that
handles statistical computations and data transformations.
You can combine scripts and syntax files for even greater flexibility, by running
ascript
from within command syntax, or by embedding command syntax within
a script.
Running
Command Syntax from a Script
You can r
un command syntax from within an automation script using the
ExecuteCommands method. Command syntax allows you to run data transformations
and statistical procedures and to produce charts. Much of this functionality cannot be
automa
ted directly from command scripts.
The easiest way to build a command syntax file is to make selections in dialog
boxes and paste the syntax for the selections into the script window.










