Overview (EXPORT command)

The EXPORT command is deprecated and will not be supported in future releases. The EXPORT command is not supported in Unicode mode.

EXPORT produces a portable data file. A portable data file is a data file created used to transport data between different types of computers and operating systems, or other software using the same portable file format. A portable file contains all of the data and dictionary information stored in the active dataset from which it was created.

EXPORT is similar to the SAVE command. It can occur in the same position in the command sequence as the SAVE command and saves the active dataset. The file includes the results of all permanent transformations and any temporary transformations made just prior to the EXPORT command. The active dataset is unchanged after the EXPORT command.

  • In most cases, saving data in portable format is no longer necessary, since IBM® SPSS® Statistics data files should be platform/operating system independent.
  • To export data in external data formats (e.g., Excel, SAS, Stata, CSV, tab-delimited), use SAVE TRANSLATE.

Options

Format. You can control the format of the portable file using the TYPE subcommand.

Variables. You can save a subset of variables from the active dataset and rename the variables using the DROP, KEEP, and RENAME subcommands. You can also produce a record of all variables and their names on the exported file with the MAP subcommand.

Precision. You can specify the number of decimal digits of precision for the values of all numeric variables on the DIGITS subcommand.

Basic Specification

The basic specification is the OUTFILE subcommand with a file specification. All variables from the active dataset are written to the portable file, with variable names, variable and value labels, missing-value flags, and print and write formats.

Subcommand Order

Subcommands can be named in any order.

Operations

  • Portable files are written with 80-character record lengths.
  • Portable files may contain some unprintable characters.
  • The active dataset is still available for transformations and procedures after the portable file is created.
  • The system variables $CASENUM and $DATE are assigned when the file is read by IMPORT.
  • If the WEIGHT command is used before EXPORT, the weighting variable is included in the portable file.
  • Variable names that exceed eight bytes are converted to unique eight-byte names—for example, mylongrootname1, mylongrootname2, and mylongrootname3 would be converted to mylongro, mylong_2, and mylong_3, respectively.

Limitations

The EXPORT command is not supported in Unicode mode. For more information, see SET command, UNICODE subcommand.