Data

Your command syntax file must specify the data to be analyzed. In most cases, you will access a data file or data source; however, command syntax files can contain inline data. The following list summarizes the syntax that can be used to get data for an analysis. See the IBM® SPSS® Statistics Command Syntax Reference (on the product ISO file) for details.

  • External and inline text data. The DATA LIST command defines a text data file (a text data file contains numbers and other alphanumeric characters) by assigning names and formats to each variable in the file. Text data can be inline (entered with your commands between BEGIN DATA and END DATA) or it can be in an external file (enter the filename in the syntax).
  • Data in IBM SPSS Statistics format. The GET FILE command reads IBM SPSS Statistics data files. For example, it reads a file that was created by the IBM SPSS Statistics SAVE command.
  • Other file formats. The GET DATA, GET SAS, and GET TRANSLATE commands create a working data file from files produced by other software applications.
  • Databases. The GET DATA command retrieves data from a database and converts them to a format that can be used by IBM SPSS Statistics procedures.

When you access data in external files, specify a fully qualified path to the files (for example, GET FILE = 'C:\myfolder\mydata.sav') to ensure that the data will be found when the report is put into production.