Next: , Previous: , Up: Top   [Contents][Index]


17 Invoking pspp-convert

pspp-convert is a command-line utility accompanying PSPP. It reads an SPSS or SPSS/PC+ system file or SPSS portable file or encrypted SPSS syntax file input and writes a copy of it to another output in a different format. Synopsis:

pspp-convert [options] input output

pspp-convert --help

pspp-convert --version

The format of input is automatically detected, when possible. The character encoding of old SPSS system files cannot always be guessed correctly, and SPSS/PC+ system files do not include any indication of their encoding. Use -e encoding to specify the encoding in this case.

By default, the intended format for output is inferred based on its extension:

csv
txt

Comma-separated value. Each value is formatted according to its variable’s print format. The first line in the file contains variable names.

sav
sys

SPSS system file.

por

SPSS portable file.

sps

SPSS syntax file. (Only encrypted syntax files may be converted to this format.)

pspp-convert can convert most input formats to most output formats. Encrypted system file and syntax files are exceptions: if the input file is in an encrypted format, then the output file must be the same format (decrypted). To decrypt such a file, specify the encrypted file as input. The output will be the equivalent plaintext file. You will be prompted for the password (or use -p, documented below).

Use -O extension to override the inferred format or to specify the format for unrecognized extensions.

The following options are accepted:

-O format
--output-format=format

Specifies the desired output format. format must be one of the extensions listed above, e.g. -O csv requests comma-separated value output.

-c maxcases
--cases=maxcases

By default, all cases are copied from input to output. Specifying this option to limit the number of cases written to output to maxcases.

-e charset
--encoding=charset

Overrides the encoding in which character strings in input are interpreted. This option is necessary because old SPSS system files, and SPSS/PC+ system files, do not self-identify their encoding.

-p password
--password=password

Specifies the password to use to decrypt an encrypted SPSS system file or syntax file. If this option is not specified, pspp-convert will prompt interactively for the password as necessary.

Be aware that command-line options, including passwords, may be visible to other users on multiuser systems.

-h
--help

Prints a usage message on stdout and exits.

-v
--version

Prints version information on stdout and exits.


Next: , Previous: , Up: Top   [Contents][Index]