Syntax file
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.

step Open demo.sav for use in this example.

step From the menus choose:

Analyze
 Descriptive Statistics
  Frequencies

step Select the Marital status item in the source list.

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

step 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.

step From the menus choose:

Edit
 Options

step 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.

step Click OK to close the Options dialog box.

step To open your journal, from the menus choose:

File
 Open
  Syntax

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

step Navigate to the location displayed in the Options dialog box.

step 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.