SPSS syntax provides a method for you to control the product without navigating through dialog boxes, viewers, or data editors. Instead, you control the application through syntax-based commands. Nearly every action you can achieve through the user interface can also be achieved through syntax. The easiest way to create syntax is to use the Paste button located on most dialog boxes.

Open demo.sav for use in this example.

From the menus choose:

Analyze
Descriptive Statistics
Frequencies

Select the Marital status item in the source list.

Click the arrow button to move the icon to the Variables list.

Click Paste to copy the syntax created as a result of the dialog box selections to the Syntax Editor.

You can use this syntax alone, add it to a larger syntax file, or refer to it in a Production Facility job.

By default, many of the calculations and actions you perform in SPSS are written to a journal file in syntax form.

From the menus choose:

Edit
Options

Click the General tab if it isn't already displayed.

New session syntax is appended to that of existing sessions by default.

The path and filename of the journal file is displayed. You can change this location by clicking Browse and navigating to the desired destination.

Click OK to close the Options dialog box.

To open your journal, from the menus choose:

File
Open
Syntax

Select All files (*.*) in the Files of type list.

Navigate to the location displayed in the Options dialog box.

Select spss.jnl and click Open.

The journal keeps track of more than just syntax; warning and error messages are also recorded here. The date and time is written at the start of each new session.